summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2018-02-22 22:35:30 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2018-02-23 11:18:25 +0100
commitf51cea125561a2a080d05d802e8ccb2bb169320b (patch)
tree9a5911ad746e806ab1cdefb3316d9d51a148967c /src/lib
parentcc4b333f5a6964120f2e40c33f67d0be7dd409fc (diff)
downloadouroboros-f51cea125561a2a080d05d802e8ccb2bb169320b.tar.gz
ouroboros-f51cea125561a2a080d05d802e8ccb2bb169320b.zip
lib: Ignore void return value for gcry_randomize
The libgcrypt gcry_randomize function returns void which was returned as an int, which gives warnings on some compilers. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/random.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/random.c b/src/lib/random.c
index 5e12cadb..78242f9d 100644
--- a/src/lib/random.c
+++ b/src/lib/random.c
@@ -56,7 +56,8 @@ int random_buffer(void * buf,
#elif defined(HAVE_SYS_RANDOM)
return getrandom(buf, len, GRND_NONBLOCK); /* glibc 2.25 */
#elif defined(HAVE_LIBGCRYPT)
- return gcry_randomize(buf, len, GCRY_STRONG_RANDOM);
+ gcry_randomize(buf, len, GCRY_STRONG_RANDOM);
+ return 0;
#elif defined(HAVE_OPENSSL)
if (len > 0 && len < INT_MAX)
return RAND_bytes((unsigned char *) buf, (int) len);