Use member names in cmd_entry definitions so I stop getting confused

about the order.
This commit is contained in:
nicm
2015-12-13 21:53:57 +00:00
parent 899bee0056
commit ecfeee2e82
63 changed files with 716 additions and 449 deletions

6
cmd.c
View File

@ -353,12 +353,12 @@ cmd_parse(int argc, char **argv, const char *file, u_int line, char **cause)
return (NULL);
}
args = args_parse(entry->args_template, argc, argv);
args = args_parse(entry->args.template, argc, argv);
if (args == NULL)
goto usage;
if (entry->args_lower != -1 && args->argc < entry->args_lower)
if (entry->args.lower != -1 && args->argc < entry->args.lower)
goto usage;
if (entry->args_upper != -1 && args->argc > entry->args_upper)
if (entry->args.upper != -1 && args->argc > entry->args.upper)
goto usage;
cmd = xcalloc(1, sizeof *cmd);