mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-22 06:27:51 +00:00
Correct test of FILE value. Get rid of compiler warning.
This commit is contained in:
parent
051bcd77bc
commit
8cdeda51f4
@ -69,7 +69,7 @@ srandomdev(void)
|
||||
#ifndef WIN32
|
||||
FILE *fd;
|
||||
fd = fopen("/dev/urandom", "r");
|
||||
if (fd >= 0) {
|
||||
if (NULL != fd) {
|
||||
if (fread(&seed, sizeof seed, 1, fd) != 1)
|
||||
WARNF("fread(\"/dev/urandom\") failed -- falling back to gettimeofday()");
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user