From: Jacob Adams Date: Wed, 18 Mar 2015 00:36:47 +0000 (-0400) Subject: properly check if configuration file is opened X-Git-Url: http://zhaoyanbai.com/repos/dig.html?a=commitdiff_plain;h=e3cf9c04f143fe0811e692809fa2b77d26becfe0;p=minix.git properly check if configuration file is opened closes #21 Change-Id: I2f83b5385ac38bf07d30acb14f40c14bec476830 --- diff --git a/minix/commands/devmand/main.c b/minix/commands/devmand/main.c index 694c676b1..8d9b1efd1 100644 --- a/minix/commands/devmand/main.c +++ b/minix/commands/devmand/main.c @@ -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); }