]> Zhao Yanbai Git Server - minix.git/commitdiff
properly check if configuration file is opened 61/2961/1
authorJacob Adams <tookmund@gmail.com>
Wed, 18 Mar 2015 00:36:47 +0000 (20:36 -0400)
committerLionel Sambuc <lionel@minix3.org>
Wed, 18 Mar 2015 07:25:19 +0000 (08:25 +0100)
closes #21

Change-Id: I2f83b5385ac38bf07d30acb14f40c14bec476830

minix/commands/devmand/main.c

index 694c676b1832a530ad6f0bd69d6461057908a886..8d9b1efd1b59916dc51497557d21f19e5e1d8916 100644 (file)
@@ -379,7 +379,7 @@ static void parse_config()
                                dbg("Parsing file %s",config_file);
                                yyin = fopen(config_file, "r");
 
-                               if (yyin < 0) {
+                               if (yyin == NULL) {
                                        dbg("Can not open config file:" 
                                               " %d.\n", errno);
                                }