diff options
Diffstat (limited to 'lib/randutils.c')
-rw-r--r-- | lib/randutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/randutils.c b/lib/randutils.c index ceeb474ef..7d85dc841 100644 --- a/lib/randutils.c +++ b/lib/randutils.c @@ -100,7 +100,7 @@ void random_get_bytes(void *buf, size_t nbytes) #ifdef HAVE_GETRANDOM errno = 0; - while (getrandom(buf, nbytes, 0) < 0) { + while (getrandom(buf, nbytes, 0) != (ssize_t)nbytes) { if (errno == EINTR) continue; break; |