aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/bar
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/bar')
-rw-r--r--sway/commands/bar/font.c2
-rw-r--r--sway/commands/bar/modifier.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/sway/commands/bar/font.c b/sway/commands/bar/font.c
index 80b7a593..f036cbc3 100644
--- a/sway/commands/bar/font.c
+++ b/sway/commands/bar/font.c
@@ -14,7 +14,7 @@ struct cmd_results *bar_cmd_font(int argc, char **argv) {
}
char *font = join_args(argv, argc);
free(config->current_bar->font);
- config->current_bar->font = strdup(font);
+ config->current_bar->font = font;
wlr_log(L_DEBUG, "Settings font '%s' for bar: %s",
config->current_bar->font, config->current_bar->id);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
diff --git a/sway/commands/bar/modifier.c b/sway/commands/bar/modifier.c
index 7ba4b125..02f845e6 100644
--- a/sway/commands/bar/modifier.c
+++ b/sway/commands/bar/modifier.c
@@ -22,9 +22,10 @@ struct cmd_results *bar_cmd_modifier(int argc, char **argv) {
mod |= tmp_mod;
continue;
} else {
+ error = cmd_results_new(CMD_INVALID, "modifier",
+ "Unknown modifier '%s'", split->items[i]);
free_flat_list(split);
- return cmd_results_new(CMD_INVALID, "modifier",
- "Unknown modifier '%s'", split->items[i]);
+ return error;
}
}
free_flat_list(split);