]> granicus.if.org Git - yasm/commitdiff
Fix pointer comparison. Should be checking for == NULL, not <0.
authorPeter Johnson <peter@tortall.net>
Sat, 10 Aug 2002 22:06:49 +0000 (22:06 -0000)
committerPeter Johnson <peter@tortall.net>
Sat, 10 Aug 2002 22:06:49 +0000 (22:06 -0000)
svn path=/trunk/yasm/; revision=679

tools/re2c/re2c.c

index 469da2d20f38cac36627e8bb8841fbc26eecf0aa..0eece4a7115345df454364eee0f85efdcfb29314 100644 (file)
@@ -42,7 +42,7 @@ int main(int argc, char *argv[]){
        fileName = "<stdin>";
        f = stdin;
     } else {
-       if((f = fopen(fileName, "rt")) < 0){
+       if((f = fopen(fileName, "rt")) == NULL){
            fprintf(stderr, "can't open %s\n", fileName);
            return 1;
        }