diff options
author | M Stoeckl <[email protected]> | 2019-01-10 18:27:21 -0500 |
---|---|---|
committer | M Stoeckl <[email protected]> | 2019-01-14 08:05:29 -0500 |
commit | 2a684cad5fc8e12a8e47a7fd00e2b7c66b43afb0 (patch) | |
tree | 56332b9c150459beb5aef94605372ef179ec8854 /sway/commands/bar/hidden_state.c | |
parent | 6d392150a72ecc3b69fcfb48865f625e2c7b79d6 (diff) |
Remove now-unused "input" argument of cmd_results_new
Patch tested by compiling with `__attribute__ ((format (printf, 2, 3)))`
applied to `cmd_results_new`.
String usage constants have been converted from pointers to arrays when
encountered. General handler format strings were sometimes modified to
include the old input string, especially for unknown command errors.
Diffstat (limited to 'sway/commands/bar/hidden_state.c')
-rw-r--r-- | sway/commands/bar/hidden_state.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands/bar/hidden_state.c b/sway/commands/bar/hidden_state.c index 79eaf01c..3364ce70 100644 --- a/sway/commands/bar/hidden_state.c +++ b/sway/commands/bar/hidden_state.c @@ -20,8 +20,7 @@ static struct cmd_results *bar_set_hidden_state(struct bar_config *bar, } else if (strcasecmp("show", hidden_state) == 0) { bar->hidden_state = strdup("show"); } else { - return cmd_results_new(CMD_INVALID, "hidden_state", - "Invalid value %s", hidden_state); + return cmd_results_new(CMD_INVALID, "Invalid value %s", hidden_state); } if (strcmp(old_state, bar->hidden_state) != 0) { if (!config->reading) { @@ -44,7 +43,7 @@ struct cmd_results *bar_cmd_hidden_state(int argc, char **argv) { return error; } if (config->reading && argc > 1) { - return cmd_results_new(CMD_INVALID, "hidden_state", + return cmd_results_new(CMD_INVALID, "Unexpected value %s in config mode", argv[1]); } @@ -65,5 +64,5 @@ struct cmd_results *bar_cmd_hidden_state(int argc, char **argv) { } } } - return error ? error : cmd_results_new(CMD_SUCCESS, NULL, NULL); + return error ? error : cmd_results_new(CMD_SUCCESS, NULL); } |