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/mode.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/mode.c')
-rw-r--r-- | sway/commands/bar/mode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands/bar/mode.c b/sway/commands/bar/mode.c index dcaf6da9..1698db8d 100644 --- a/sway/commands/bar/mode.c +++ b/sway/commands/bar/mode.c @@ -21,7 +21,7 @@ static struct cmd_results *bar_set_mode(struct bar_config *bar, const char *mode } else if (strcasecmp("invisible", mode) == 0) { bar->mode = strdup("invisible"); } else { - return cmd_results_new(CMD_INVALID, "mode", "Invalid value %s", mode); + return cmd_results_new(CMD_INVALID, "Invalid value %s", mode); } if (strcmp(old_mode, bar->mode) != 0) { @@ -46,7 +46,7 @@ struct cmd_results *bar_cmd_mode(int argc, char **argv) { } if (config->reading && argc > 1) { return cmd_results_new(CMD_INVALID, - "mode", "Unexpected value %s in config mode", argv[1]); + "Unexpected value %s in config mode", argv[1]); } const char *mode = argv[0]; @@ -66,5 +66,5 @@ struct cmd_results *bar_cmd_mode(int argc, char **argv) { } } } - return error ? error : cmd_results_new(CMD_SUCCESS, NULL, NULL); + return error ? error : cmd_results_new(CMD_SUCCESS, NULL); } |