aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/split.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/split.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/split.c')
-rw-r--r--sway/commands/split.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/commands/split.c b/sway/commands/split.c
index 84385fa9..ed370d26 100644
--- a/sway/commands/split.c
+++ b/sway/commands/split.c
@@ -24,7 +24,7 @@ static struct cmd_results *do_split(int layout) {
24 24
25 arrange_workspace(ws); 25 arrange_workspace(ws);
26 26
27 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 27 return cmd_results_new(CMD_SUCCESS, NULL);
28} 28}
29 29
30struct cmd_results *cmd_split(int argc, char **argv) { 30struct cmd_results *cmd_split(int argc, char **argv) {
@@ -33,7 +33,7 @@ struct cmd_results *cmd_split(int argc, char **argv) {
33 return error; 33 return error;
34 } 34 }
35 if (!root->outputs->length) { 35 if (!root->outputs->length) {
36 return cmd_results_new(CMD_INVALID, "split", 36 return cmd_results_new(CMD_INVALID,
37 "Can't run this command while there's no outputs connected."); 37 "Can't run this command while there's no outputs connected.");
38 } 38 }
39 if (strcasecmp(argv[0], "v") == 0 || strcasecmp(argv[0], "vertical") == 0) { 39 if (strcasecmp(argv[0], "v") == 0 || strcasecmp(argv[0], "vertical") == 0) {
@@ -51,10 +51,10 @@ struct cmd_results *cmd_split(int argc, char **argv) {
51 return do_split(L_VERT); 51 return do_split(L_VERT);
52 } 52 }
53 } else { 53 } else {
54 return cmd_results_new(CMD_FAILURE, "split", 54 return cmd_results_new(CMD_FAILURE,
55 "Invalid split command (expected either horizontal or vertical)."); 55 "Invalid split command (expected either horizontal or vertical).");
56 } 56 }
57 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 57 return cmd_results_new(CMD_SUCCESS, NULL);
58} 58}
59 59
60struct cmd_results *cmd_splitv(int argc, char **argv) { 60struct cmd_results *cmd_splitv(int argc, char **argv) {