error on not enough input/seat args for cmd

master
Tony Crisci 7 years ago
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;
@ -59,7 +62,4 @@ 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;
@ -31,7 +34,4 @@ 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…
Cancel
Save