summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Costache <alexandru.costache.100@gmail.com>2014-07-04 11:58:14 +0300
committeralexandru.costache <alexandru.costache@windriver.com>2014-07-04 12:28:35 +0300
commit4841c48f81dbd4e557e647dd97ddade8711b8cee (patch)
treea581cdb0f24b55d7dcd2d5abe637f063f8aae7c6
parentd4e81f9ec8273914739808737fa0a27a3f0589fb (diff)
Removed duplicate check in random_seed test - bug #140
-rw-r--r--random_seed.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/random_seed.c b/random_seed.c
index 3b520d4..4f6dbb2 100644
--- a/random_seed.c
+++ b/random_seed.c
@@ -160,13 +160,10 @@ static int get_dev_random_seed()
int r;
ssize_t nread = read(fd, &r, sizeof(r));
if (nread != sizeof(r)) {
- fprintf(stderr, "error read %s: %s", dev_random_file, strerror(errno));
- exit(1);
- }
- else if (nread != sizeof(r)) {
- fprintf(stderr, "error short read %s", dev_random_file);
+ fprintf(stderr, "error short read %s: %s", dev_random_file, strerror(errno));
exit(1);
}
+
close(fd);
return r;
}