summaryrefslogtreecommitdiff
path: root/sway/commands/assign.c
diff options
context:
space:
mode:
authorM Stoeckl <[email protected]>2019-01-10 18:27:21 -0500
committerM Stoeckl <[email protected]>2019-01-14 08:05:29 -0500
commit2a684cad5fc8e12a8e47a7fd00e2b7c66b43afb0 (patch)
tree56332b9c150459beb5aef94605372ef179ec8854 /sway/commands/assign.c
parent6d392150a72ecc3b69fcfb48865f625e2c7b79d6 (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/assign.c')
-rw-r--r--sway/commands/assign.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/commands/assign.c b/sway/commands/assign.c
index 716d70cf..3bd1f65d 100644
--- a/sway/commands/assign.c
+++ b/sway/commands/assign.c
@@ -17,7 +17,7 @@ struct cmd_results *cmd_assign(int argc, char **argv) {
char *err_str = NULL;
struct criteria *criteria = criteria_parse(argv[0], &err_str);
if (!criteria) {
- error = cmd_results_new(CMD_INVALID, "assign", err_str);
+ error = cmd_results_new(CMD_INVALID, err_str);
free(err_str);
return error;
}
@@ -27,7 +27,7 @@ struct cmd_results *cmd_assign(int argc, char **argv) {
if (strncmp(*argv, "→", strlen("→")) == 0) {
if (argc < 2) {
free(criteria);
- return cmd_results_new(CMD_INVALID, "assign", "Missing workspace");
+ return cmd_results_new(CMD_INVALID, "Missing workspace");
}
--argc;
++argv;
@@ -44,7 +44,7 @@ struct cmd_results *cmd_assign(int argc, char **argv) {
--argc; ++argv;
if (argv[0][0] < '0' || argv[0][0] > '9') {
free(criteria);
- return cmd_results_new(CMD_INVALID, "assign",
+ return cmd_results_new(CMD_INVALID,
"Invalid workspace number '%s'", argv[0]);
}
criteria->type = CT_ASSIGN_WORKSPACE_NUMBER;
@@ -59,5 +59,5 @@ struct cmd_results *cmd_assign(int argc, char **argv) {
wlr_log(WLR_DEBUG, "assign: '%s' -> '%s' added", criteria->raw,
criteria->target);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}