summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-06 14:47:56 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-06 14:47:56 -0700
commiteb10c58258c3d4e6d207c390282f7d329e63910a (patch)
treebf2c62f8141c09d07b2c473d493b56d817a5779e
parent07f93358ac7bc532b16ceff13bed356ac2a0c6f1 (diff)
arc4random_buf: Only declare ret if HAVE_GETENTROPY is defined
Clears unused variable warning from cppcheck Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--Key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Key.c b/Key.c
index eaaa90f..f338e0c 100644
--- a/Key.c
+++ b/Key.c
@@ -84,9 +84,9 @@ insecure_getrandom_buf (unsigned char *auth, int len)
static void
arc4random_buf (void *auth, int len)
{
+#if HAVE_GETENTROPY
int ret;
-#if HAVE_GETENTROPY
/* weak emulation of arc4random through the getentropy libc call */
ret = getentropy (auth, len);
if (ret == 0)