fixed linux compile error (ignored read return value)

This commit is contained in:
git@daemon.de
2014-08-01 08:31:50 +02:00
parent e033df7156
commit eb84621a89

View File

@@ -54,9 +54,13 @@ int getseed(void) {
int r;
if (fd < 0) {
perror("open");
exit(0);
exit(1);
}
if(read(fd, &r, sizeof(r)) == -1) {
close(fd);
perror("could not read from /dev/urandom");
exit(1);
}
read(fd, &r, sizeof(r));
close(fd);
return(r);
}