diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-31 06:10:25 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-31 06:11:31 +0200 |
commit | 6ed0948d5df69ff81404a702cfbebe3217fa2f90 (patch) | |
tree | 6ddaf5523639c2f6f81f479b12745a2f9926a52e /src/random.c | |
parent | 73f7d5048c0e2ad4817ad208de02adee73938ed0 (diff) | |
download | fastd-6ed0948d5df69ff81404a702cfbebe3217fa2f90.tar fastd-6ed0948d5df69ff81404a702cfbebe3217fa2f90.zip |
Remove EINTR handling where signals are blocked anyways
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; } |