properly check if configuration file is opened

This commit is contained in:
Jacob Adams 2015-03-17 20:36:47 -04:00
parent 61890c3b2e
commit 7beace62d9

View File

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