X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/0e27cb6045e34d6e423a4b960b199277f1c58389..720f700ea5af91c2faab20e74515f157e6e8cbdf:/unix/uxstore.c diff --git a/unix/uxstore.c b/unix/uxstore.c index 9d767266..2476e4ed 100644 --- a/unix/uxstore.c +++ b/unix/uxstore.c @@ -638,7 +638,7 @@ void read_random_seed(noise_consumer_t consumer) fname = make_filename(INDEX_RANDSEED, NULL); fd = open(fname, O_RDONLY); sfree(fname); - if (fd) { + if (fd >= 0) { char buf[512]; int ret; while ( (ret = read(fd, buf, sizeof(buf))) > 0)