commands: remove EXPECTED_MORE_THAN

Its uses have been replaced with EXPECTED_AT_LEAST.
This commit is contained in:
Ian Fan 2018-10-23 10:17:58 +01:00
parent a9fdd5dd2a
commit 5364255f26
6 changed files with 5 additions and 14 deletions

View file

@ -20,14 +20,6 @@
struct cmd_results *checkarg(int argc, const char *name, enum expected_args type, int val) {
struct cmd_results *error = NULL;
switch (type) {
case EXPECTED_MORE_THAN:
if (argc > val) {
return NULL;
}
error = cmd_results_new(CMD_INVALID, name, "Invalid %s command "
"(expected more than %d argument%s, got %d)",
name, val, (char*[2]){"s", ""}[argc==1], argc);
break;
case EXPECTED_AT_LEAST:
if (argc >= val) {
return NULL;