diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/sway/commands.c b/sway/commands.c index 3f416afc..4c1b34d5 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -20,14 +20,6 @@ | |||
20 | struct cmd_results *checkarg(int argc, const char *name, enum expected_args type, int val) { | 20 | struct cmd_results *checkarg(int argc, const char *name, enum expected_args type, int val) { |
21 | struct cmd_results *error = NULL; | 21 | struct cmd_results *error = NULL; |
22 | switch (type) { | 22 | switch (type) { |
23 | case EXPECTED_MORE_THAN: | ||
24 | if (argc > val) { | ||
25 | return NULL; | ||
26 | } | ||
27 | error = cmd_results_new(CMD_INVALID, name, "Invalid %s command " | ||
28 | "(expected more than %d argument%s, got %d)", | ||
29 | name, val, (char*[2]){"s", ""}[argc==1], argc); | ||
30 | break; | ||
31 | case EXPECTED_AT_LEAST: | 23 | case EXPECTED_AT_LEAST: |
32 | if (argc >= val) { | 24 | if (argc >= val) { |
33 | return NULL; | 25 | return NULL; |