From 51fa988be9203dd81fd0897611a854ef9f4b4f5f Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sun, 3 Jun 2018 10:29:00 -0400 Subject: [PATCH] Address review comments for output subcommands --- sway/commands/output.c | 3 +++ sway/commands/output/background.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sway/commands/output.c b/sway/commands/output.c index a7d325ec..bc12310e 100644 --- a/sway/commands/output.c +++ b/sway/commands/output.c @@ -35,6 +35,9 @@ struct cmd_results *cmd_output(int argc, char **argv) { config->handler_context.output_config = output; while (argc > 0) { + config->handler_context.leftovers.argc = 0; + config->handler_context.leftovers.argv = NULL; + if (find_handler(*argv, output_handlers, sizeof(output_handlers))) { error = config_subcommand(argv, argc, output_handlers, sizeof(output_handlers)); diff --git a/sway/commands/output/background.c b/sway/commands/output/background.c index f039c9c9..0c5c164f 100644 --- a/sway/commands/output/background.c +++ b/sway/commands/output/background.c @@ -8,7 +8,7 @@ #include "log.h" #include "stringop.h" -static char *bg_options[] = { +static const char *bg_options[] = { "stretch", "center", "fill",