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/border.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/border.c')
-rw-r--r-- | sway/commands/border.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sway/commands/border.c b/sway/commands/border.c index d51741d2..6be5b794 100644 --- a/sway/commands/border.c +++ b/sway/commands/border.c @@ -64,8 +64,7 @@ struct cmd_results *cmd_border(int argc, char **argv) { struct sway_container *container = config->handler_context.container; if (!container || !container->view) { - return cmd_results_new(CMD_INVALID, "border", - "Only views can have borders"); + return cmd_results_new(CMD_INVALID, "Only views can have borders"); } struct sway_view *view = container->view; @@ -77,14 +76,14 @@ struct cmd_results *cmd_border(int argc, char **argv) { set_border(container, B_PIXEL); } else if (strcmp(argv[0], "csd") == 0) { if (!view || !view->xdg_decoration) { - return cmd_results_new(CMD_INVALID, "border", + return cmd_results_new(CMD_INVALID, "This window doesn't support client side decorations"); } set_border(container, B_CSD); } else if (strcmp(argv[0], "toggle") == 0) { border_toggle(container); } else { - return cmd_results_new(CMD_INVALID, "border", + return cmd_results_new(CMD_INVALID, "Expected 'border <none|normal|pixel|csd|toggle>' " "or 'border pixel <px>'"); } @@ -98,5 +97,5 @@ struct cmd_results *cmd_border(int argc, char **argv) { arrange_container(container); - return cmd_results_new(CMD_SUCCESS, NULL, NULL); + return cmd_results_new(CMD_SUCCESS, NULL); } |