must initialize cmdline_parser before we read args

This commit is contained in:
Eric 2013-08-29 18:05:06 -04:00
parent 48f5299c53
commit e4025464b0

View File

@ -341,13 +341,14 @@ int main(int argc, char *argv[])
params->override = 0; params->override = 0;
params->check_required = 0; params->check_required = 0;
if (cmdline_parser_ext(argc, argv, &args, params) != 0) {
exit(EXIT_SUCCESS);
}
zconf.log_level = args.verbosity_arg; zconf.log_level = args.verbosity_arg;
log_init(stderr, zconf.log_level); log_init(stderr, zconf.log_level);
log_trace("zmap", "zmap main thread started"); log_trace("zmap", "zmap main thread started");
if (cmdline_parser_ext(argc, argv, &args, params) != 0) {
exit(EXIT_SUCCESS);
}
if (args.help_given) { if (args.help_given) {
cmdline_parser_print_help(); cmdline_parser_print_help();
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);