error on not enough input/seat args for cmd
This commit is contained in:
parent
730af5e721
commit
5c036a3eac
|
@ -16,7 +16,10 @@ struct cmd_results *cmd_input(int argc, char **argv) {
|
|||
return cmd_results_new(CMD_BLOCK_INPUT, NULL, NULL);
|
||||
}
|
||||
|
||||
if (argc > 2) {
|
||||
if ((error = checkarg(argc, "input", EXPECTED_AT_LEAST, 3))) {
|
||||
return error;
|
||||
}
|
||||
|
||||
int argc_new = argc-2;
|
||||
char **argv_new = argv+2;
|
||||
|
||||
|
@ -60,6 +63,3 @@ struct cmd_results *cmd_input(int argc, char **argv) {
|
|||
current_input_config = NULL;
|
||||
return res;
|
||||
}
|
||||
|
||||
return cmd_results_new(CMD_BLOCK_INPUT, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,10 @@ struct cmd_results *cmd_seat(int argc, char **argv) {
|
|||
return cmd_results_new(CMD_BLOCK_SEAT, NULL, NULL);
|
||||
}
|
||||
|
||||
if (argc > 2) {
|
||||
if ((error = checkarg(argc, "seat", EXPECTED_AT_LEAST, 3))) {
|
||||
return error;
|
||||
}
|
||||
|
||||
int argc_new = argc-2;
|
||||
char **argv_new = argv+2;
|
||||
|
||||
|
@ -32,6 +35,3 @@ struct cmd_results *cmd_seat(int argc, char **argv) {
|
|||
current_seat_config = NULL;
|
||||
return res;
|
||||
}
|
||||
|
||||
return cmd_results_new(CMD_BLOCK_SEAT, NULL, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue