diff options
author | Ryan Dwyer <RyanDwyer@users.noreply.github.com> | 2018-10-23 20:33:40 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-23 20:33:40 +1000 |
commit | e33671fd9a478a917250b2e3b889c9ee0e49c65c (patch) | |
tree | 32f4a9782328486f529c09fe2bb8092c25b9993d /sway/commands/bar | |
parent | 970501f05e8a1835b880953888ad3022fb2e9ada (diff) | |
parent | 9227cb7d673b012a0c6730800d528f9d729972b6 (diff) |
Merge pull request #2941 from ianyfan/commands
commands: clean up checkargs function +other small changes
Diffstat (limited to 'sway/commands/bar')
-rw-r--r-- | sway/commands/bar/bindsym.c | 2 | ||||
-rw-r--r-- | sway/commands/bar/hidden_state.c | 2 | ||||
-rw-r--r-- | sway/commands/bar/mode.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands/bar/bindsym.c b/sway/commands/bar/bindsym.c index 4eea3e6a..965c8903 100644 --- a/sway/commands/bar/bindsym.c +++ b/sway/commands/bar/bindsym.c @@ -10,7 +10,7 @@ struct cmd_results *bar_cmd_bindsym(int argc, char **argv) { struct cmd_results *error = NULL; - if ((error = checkarg(argc, "bar bindsym", EXPECTED_MORE_THAN, 1))) { + if ((error = checkarg(argc, "bar bindsym", EXPECTED_AT_LEAST, 2))) { return error; } if (!config->current_bar) { diff --git a/sway/commands/bar/hidden_state.c b/sway/commands/bar/hidden_state.c index 28adf6c7..5be6c2dc 100644 --- a/sway/commands/bar/hidden_state.c +++ b/sway/commands/bar/hidden_state.c @@ -40,7 +40,7 @@ struct cmd_results *bar_cmd_hidden_state(int argc, char **argv) { if ((error = checkarg(argc, "hidden_state", EXPECTED_AT_LEAST, 1))) { return error; } - if ((error = checkarg(argc, "hidden_state", EXPECTED_LESS_THAN, 3))) { + if ((error = checkarg(argc, "hidden_state", EXPECTED_AT_MOST, 2))) { return error; } if (config->reading && argc > 1) { diff --git a/sway/commands/bar/mode.c b/sway/commands/bar/mode.c index dbdd3897..2cba785e 100644 --- a/sway/commands/bar/mode.c +++ b/sway/commands/bar/mode.c @@ -41,7 +41,7 @@ struct cmd_results *bar_cmd_mode(int argc, char **argv) { if ((error = checkarg(argc, "mode", EXPECTED_AT_LEAST, 1))) { return error; } - if ((error = checkarg(argc, "mode", EXPECTED_LESS_THAN, 3))) { + if ((error = checkarg(argc, "mode", EXPECTED_AT_MOST, 2))) { return error; } if (config->reading && argc > 1) { |