aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/bar/mode.c
diff options
context:
space:
mode:
authorLibravatar M Stoeckl <code@mstoeckl.com>2019-01-10 18:27:21 -0500
committerLibravatar M Stoeckl <code@mstoeckl.com>2019-01-14 08:05:29 -0500
commit2a684cad5fc8e12a8e47a7fd00e2b7c66b43afb0 (patch)
tree56332b9c150459beb5aef94605372ef179ec8854 /sway/commands/bar/mode.c
parentRemove 'input' field of IPC command return json (diff)
downloadsway-2a684cad5fc8e12a8e47a7fd00e2b7c66b43afb0.tar.gz
sway-2a684cad5fc8e12a8e47a7fd00e2b7c66b43afb0.tar.zst
sway-2a684cad5fc8e12a8e47a7fd00e2b7c66b43afb0.zip
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.c6
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
21 } else if (strcasecmp("invisible", mode) == 0) { 21 } else if (strcasecmp("invisible", mode) == 0) {
22 bar->mode = strdup("invisible"); 22 bar->mode = strdup("invisible");
23 } else { 23 } else {
24 return cmd_results_new(CMD_INVALID, "mode", "Invalid value %s", mode); 24 return cmd_results_new(CMD_INVALID, "Invalid value %s", mode);
25 } 25 }
26 26
27 if (strcmp(old_mode, bar->mode) != 0) { 27 if (strcmp(old_mode, bar->mode) != 0) {
@@ -46,7 +46,7 @@ struct cmd_results *bar_cmd_mode(int argc, char **argv) {
46 } 46 }
47 if (config->reading && argc > 1) { 47 if (config->reading && argc > 1) {
48 return cmd_results_new(CMD_INVALID, 48 return cmd_results_new(CMD_INVALID,
49 "mode", "Unexpected value %s in config mode", argv[1]); 49 "Unexpected value %s in config mode", argv[1]);
50 } 50 }
51 51
52 const char *mode = argv[0]; 52 const char *mode = argv[0];
@@ -66,5 +66,5 @@ struct cmd_results *bar_cmd_mode(int argc, char **argv) {
66 } 66 }
67 } 67 }
68 } 68 }
69 return error ? error : cmd_results_new(CMD_SUCCESS, NULL, NULL); 69 return error ? error : cmd_results_new(CMD_SUCCESS, NULL);
70} 70}