Make empire, empsched and files catch extra operands

This also avoids a dead increment ap++ in src/client/main.c reported
by the Clang Static Analyzer.
This commit is contained in:
Markus Armbruster 2010-01-16 09:29:53 +01:00
parent fe0ef18e2b
commit 390841a40a
3 changed files with 17 additions and 0 deletions

View file

@ -105,6 +105,12 @@ main(int argc, char *argv[])
}
}
if (argv[optind]) {
fprintf(stderr, "%s: does not take operands\n", argv[0]);
fprintf(stderr, "Try -h for help.\n");
exit(1);
}
empfile_init();
if (emp_config(config_file) < 0)
exit(1);