summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
Diffstat (limited to 'networking')
-rw-r--r--networking/nameif.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/nameif.c b/networking/nameif.c
index c5a715e..291780a 100644
--- a/networking/nameif.c
+++ b/networking/nameif.c
@@ -160,12 +160,12 @@ int nameif_main(int argc, char **argv)
prepend_new_eth_table(&clist, ifname, *argv++);
}
} else {
- struct parser_t parser;
- if (config_open(&parser, fname)) {
+ struct parser_t *parser = config_open(fname);
+ if (parser) {
char *tokens[2];
- while (config_read(&parser, tokens, 2, 2, " \t", '#') >= 0)
+ while (config_read(parser, tokens, 2, 2, " \t", '#') >= 0)
prepend_new_eth_table(&clist, tokens[0], tokens[1]);
- config_close(&parser);
+ config_close(parser);
}
}