diff options
author | M Stoeckl <code@mstoeckl.com> | 2019-01-10 18:27:21 -0500 |
---|---|---|
committer | M Stoeckl <code@mstoeckl.com> | 2019-01-14 08:05:29 -0500 |
commit | 2a684cad5fc8e12a8e47a7fd00e2b7c66b43afb0 (patch) | |
tree | 56332b9c150459beb5aef94605372ef179ec8854 /sway/commands/floating_modifier.c | |
parent | Remove 'input' field of IPC command return json (diff) | |
download | sway-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/floating_modifier.c')
-rw-r--r-- | sway/commands/floating_modifier.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands/floating_modifier.c b/sway/commands/floating_modifier.c index f5d2b3fe..3674971a 100644 --- a/sway/commands/floating_modifier.c +++ b/sway/commands/floating_modifier.c | |||
@@ -11,8 +11,7 @@ struct cmd_results *cmd_floating_modifier(int argc, char **argv) { | |||
11 | 11 | ||
12 | uint32_t mod = get_modifier_mask_by_name(argv[0]); | 12 | uint32_t mod = get_modifier_mask_by_name(argv[0]); |
13 | if (!mod) { | 13 | if (!mod) { |
14 | return cmd_results_new(CMD_INVALID, "floating_modifier", | 14 | return cmd_results_new(CMD_INVALID, "Invalid modifier"); |
15 | "Invalid modifier"); | ||
16 | } | 15 | } |
17 | 16 | ||
18 | if (argc == 1 || strcasecmp(argv[1], "normal") == 0) { | 17 | if (argc == 1 || strcasecmp(argv[1], "normal") == 0) { |
@@ -20,11 +19,11 @@ struct cmd_results *cmd_floating_modifier(int argc, char **argv) { | |||
20 | } else if (strcasecmp(argv[1], "inverse") == 0) { | 19 | } else if (strcasecmp(argv[1], "inverse") == 0) { |
21 | config->floating_mod_inverse = true; | 20 | config->floating_mod_inverse = true; |
22 | } else { | 21 | } else { |
23 | return cmd_results_new(CMD_INVALID, "floating_modifier", | 22 | return cmd_results_new(CMD_INVALID, |
24 | "Usage: floating_modifier <mod> [inverse|normal]"); | 23 | "Usage: floating_modifier <mod> [inverse|normal]"); |
25 | } | 24 | } |
26 | 25 | ||
27 | config->floating_mod = mod; | 26 | config->floating_mod = mod; |
28 | 27 | ||
29 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 28 | return cmd_results_new(CMD_SUCCESS, NULL); |
30 | } | 29 | } |