Commit 1a2701ba authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't fail if /dev/random is unreadable.

parent 35d637ea
...@@ -420,7 +420,7 @@ main(int argc, char **argv) ...@@ -420,7 +420,7 @@ main(int argc, char **argv)
rc = read(rfd, &seed, sizeof(unsigned int)); rc = read(rfd, &seed, sizeof(unsigned int));
if(rc < sizeof(unsigned int)) { if(rc < sizeof(unsigned int)) {
perror("read(random)"); perror("read(random)");
goto fail; memcpy(&seed, myid + 12, 4);
} }
close(rfd); close(rfd);
rfd = -1; rfd = -1;
......
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