Commit fe65f98c authored by Aurelio Colosimo's avatar Aurelio Colosimo

fix command line return when help is printed out (ppt exits immediately)

parent 8ce43d30
......@@ -57,7 +57,7 @@ int main(int argc, char **argv)
OPTS(ppi)->iface_name = ifname;
if (pp_parse_cmdline(ppi, argc, argv) < 0)
if (pp_parse_cmdline(ppi, argc, argv) != 0)
return -1;
posix_main_loop(ppi);
......
......@@ -125,7 +125,7 @@ int pp_parse_cmdline(struct pp_instance *ppi, int argc, char **argv)
switch (a[1]) {
case '?':
cmd_line_print_help();
break;
return 1;
case 'V':
pp_diag_verbosity = 1;
break;
......@@ -224,7 +224,7 @@ int pp_parse_cmdline(struct pp_instance *ppi, int argc, char **argv)
break;
default:
cmd_line_print_help();
break;
return -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