diff options
Diffstat (limited to 'lib/random_dev_urandom.c')
| -rw-r--r-- | lib/random_dev_urandom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/random_dev_urandom.c b/lib/random_dev_urandom.c index e508fe9f3e3c..acae6ba4b047 100644 --- a/lib/random_dev_urandom.c +++ b/lib/random_dev_urandom.c @@ -49,11 +49,11 @@ writeRandomBytes_dev_urandom(void *target, size_t count) { const int fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC); if (fd < 0) { - return 0; + return false; } do { - void *const currentTarget = (void *)((char *)target + bytesWrittenTotal); + void *const currentTarget = (char *)target + bytesWrittenTotal; const size_t bytesToWrite = count - bytesWrittenTotal; errno = 0; |
