mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-16 19:40: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;
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user