mirror of https://github.com/nirenjan/libx52.git
Remove obsolete check for invalid handler
Since the introduction of X macros to the CLI handling code, there will never be a condition where the handler will be NULL. This is a legacy check from when the code had individual maps that were maintained by hand.cpp
parent
44fba0c6cd
commit
552e638b27
|
|
@ -497,11 +497,6 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = &handlers[result.value.int_val];
|
cmd = &handlers[result.value.int_val];
|
||||||
if (!cmd->handler) {
|
|
||||||
fprintf(stderr, "Command %s not implemented yet!\n", argv[1]);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cmd->num_args > argc - 2) {
|
if (cmd->num_args > argc - 2) {
|
||||||
fprintf(stderr, "Insufficient arguments for command %s\n", argv[1]);
|
fprintf(stderr, "Insufficient arguments for command %s\n", argv[1]);
|
||||||
do_help(cmd);
|
do_help(cmd);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue