X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/0e27cb6045e34d6e423a4b960b199277f1c58389..f03bd6da7b947c872e9d829e8d84fc97e04cc4f9:/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)