Commit 6fb722b6 authored by Geoff Simmons's avatar Geoff Simmons

Silence an "unused result" warning for the benchmark code.

parent 8273aaa0
......@@ -254,8 +254,11 @@ main(int argc, char *argv[])
strerror(errno));
exit(EXIT_FAILURE);
}
(void)fread(seed, sizeof(uint32_t), 4, urandom);
if (ferror(urandom)) {
if (fread(seed, sizeof(uint32_t), 4, urandom) != 4) {
fprintf(stderr, "Failed to read 128 bits from /dev/urandom\n");
exit(EXIT_FAILURE);
}
else if (ferror(urandom)) {
fprintf(stderr, "Error reading /dev/urandom: %s\n",
strerror(errno));
exit(EXIT_FAILURE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment