diff options
author | Alexandru Costache <alexandru.costache.100@gmail.com> | 2014-07-04 11:58:14 +0300 |
---|---|---|
committer | alexandru.costache <alexandru.costache@windriver.com> | 2014-07-04 12:28:35 +0300 |
commit | 4841c48f81dbd4e557e647dd97ddade8711b8cee (patch) | |
tree | a581cdb0f24b55d7dcd2d5abe637f063f8aae7c6 | |
parent | d4e81f9ec8273914739808737fa0a27a3f0589fb (diff) | |
download | android_external_json-c-4841c48f81dbd4e557e647dd97ddade8711b8cee.tar.gz android_external_json-c-4841c48f81dbd4e557e647dd97ddade8711b8cee.tar.bz2 android_external_json-c-4841c48f81dbd4e557e647dd97ddade8711b8cee.zip |
Removed duplicate check in random_seed test - bug #140
-rw-r--r-- | random_seed.c | 7 |
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; } |