shithub: riscv

Download patch

ref: dd318f09cd42e6bbd634ba98c78b47e9ba0384c6
parent: f3609bada2fdae4f5f66d00eecb1ed3068abcf42
author: cinap_lenrek <[email protected]>
date: Fri Apr 20 12:42:12 EDT 2012

cpp: fd <= 0 vs. fd < 0

--- a/sys/src/cmd/cpp/nlist.c
+++ b/sys/src/cmd/cpp/nlist.c
@@ -168,7 +168,7 @@
 			dp[len] = '\0';
 		}
 		fp = (char*)newstring((uchar*)argv[0], strlen(argv[0]), 0);
-		if ((fd = open(fp, 0)) <= 0)
+		if ((fd = open(fp, 0)) < 0)
 			error(FATAL, "Can't open input file %s", fp);
 	}
 	if (argc > 1) {