diff options
Diffstat (limited to 'sway/commands/output/scale.c')
-rw-r--r-- | sway/commands/output/scale.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands/output/scale.c b/sway/commands/output/scale.c index 0b4cc131..9398e06a 100644 --- a/sway/commands/output/scale.c +++ b/sway/commands/output/scale.c | |||
@@ -4,17 +4,16 @@ | |||
4 | 4 | ||
5 | struct cmd_results *output_cmd_scale(int argc, char **argv) { | 5 | struct cmd_results *output_cmd_scale(int argc, char **argv) { |
6 | if (!config->handler_context.output_config) { | 6 | if (!config->handler_context.output_config) { |
7 | return cmd_results_new(CMD_FAILURE, "output", "Missing output config"); | 7 | return cmd_results_new(CMD_FAILURE, "Missing output config"); |
8 | } | 8 | } |
9 | if (!argc) { | 9 | if (!argc) { |
10 | return cmd_results_new(CMD_INVALID, "output", | 10 | return cmd_results_new(CMD_INVALID, "Missing scale argument."); |
11 | "Missing scale argument."); | ||
12 | } | 11 | } |
13 | 12 | ||
14 | char *end; | 13 | char *end; |
15 | config->handler_context.output_config->scale = strtof(*argv, &end); | 14 | config->handler_context.output_config->scale = strtof(*argv, &end); |
16 | if (*end) { | 15 | if (*end) { |
17 | return cmd_results_new(CMD_INVALID, "output", "Invalid scale."); | 16 | return cmd_results_new(CMD_INVALID, "Invalid scale."); |
18 | } | 17 | } |
19 | 18 | ||
20 | config->handler_context.leftovers.argc = argc - 1; | 19 | config->handler_context.leftovers.argc = argc - 1; |