aboutsummaryrefslogtreecommitdiff
path: root/lib/random_getentropy.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/random_getentropy.c')
-rw-r--r--lib/random_getentropy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/random_getentropy.c b/lib/random_getentropy.c
index d258df6a7678..ad8b1984fea0 100644
--- a/lib/random_getentropy.c
+++ b/lib/random_getentropy.c
@@ -54,7 +54,7 @@
bool
writeRandomBytes_getentropy(void *target, size_t count) {
errno = 0;
- const bool success = getentropy(target, count);
+ const bool success = (getentropy(target, count) == 0);
// MSan does not understand `getentropy`, so explain its effects
if (success)
MSAN_UNPOISON(target, count);