mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 03:50:57 +01:00
fixed linux compile error (ignored read return value)
This commit is contained in:
@@ -54,9 +54,13 @@ int getseed(void) {
|
|||||||
int r;
|
int r;
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
perror("open");
|
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);
|
close(fd);
|
||||||
return(r);
|
return(r);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user