diff options
Diffstat (limited to 'src/random.c')
-rw-r--r-- | src/random.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/random.c b/src/random.c index 72a238b..72e6c6a 100644 --- a/src/random.c +++ b/src/random.c @@ -53,12 +53,8 @@ void fastd_random_bytes(void *buffer, size_t len, bool secure) { while (read_bytes < len) { ssize_t ret = read(fd, ((char*)buffer)+read_bytes, len-read_bytes); - if (ret < 0) { - if (errno == EINTR) - continue; - + if (ret < 0) exit_errno("unable to read from random device"); - } read_bytes += ret; } |