Centralise generation of the control sequences for arrow keys into a
[u/mdw/putty] / unix / uxstore.c
index 9d76726..2476e4e 100644 (file)
@@ -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)