From 9227cb7d673b012a0c6730800d528f9d729972b6 Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Tue, 23 Oct 2018 10:40:03 +0100 Subject: commands: replace EXPECTED_LESS_THAN with EXPECTED_AT_MOST This makes it a bit more obvious what the expected number of arguments is. --- sway/commands/bar/hidden_state.c | 2 +- sway/commands/bar/mode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sway/commands/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) { -- cgit v1.2.3