Commit a19cbc51 authored by hpi1's avatar hpi1

parser_test: check argument count

parent 3fec7c2e
......@@ -166,8 +166,10 @@ static int print_config_file(config_file *cfgfile)
/* main */
int main (int argc, char **argv)
{
/* suppress unused parameter warning */
if (argc) {}
if (argc != 2) {
fprintf(stderr, "usage: parser_test [config_file]\n");
return EXIT_FAILURE;
}
config_file *cfgfile = keydbcfg_new_config_file();
int retval = keydbcfg_parse_config(cfgfile, argv[1]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment