From e3cf9c04f143fe0811e692809fa2b77d26becfe0 Mon Sep 17 00:00:00 2001 From: Jacob Adams Date: Tue, 17 Mar 2015 20:36:47 -0400 Subject: [PATCH] properly check if configuration file is opened closes #21 Change-Id: I2f83b5385ac38bf07d30acb14f40c14bec476830 --- minix/commands/devmand/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }