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/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=refs%2Fchanges%2F61%2F2961%2F1;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); }