diff options
Diffstat (limited to 'sway/commands/bar/position.c')
-rw-r--r-- | sway/commands/bar/position.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sway/commands/bar/position.c b/sway/commands/bar/position.c index efa8c0bc..9c580483 100644 --- a/sway/commands/bar/position.c +++ b/sway/commands/bar/position.c | |||
@@ -9,11 +9,9 @@ struct cmd_results *bar_cmd_position(int argc, char **argv) { | |||
9 | if ((error = checkarg(argc, "position", EXPECTED_EQUAL_TO, 1))) { | 9 | if ((error = checkarg(argc, "position", EXPECTED_EQUAL_TO, 1))) { |
10 | return error; | 10 | return error; |
11 | } | 11 | } |
12 | |||
13 | if (!config->current_bar) { | 12 | if (!config->current_bar) { |
14 | return cmd_results_new(CMD_FAILURE, "position", "No bar defined."); | 13 | return cmd_results_new(CMD_FAILURE, "position", "No bar defined."); |
15 | } | 14 | } |
16 | |||
17 | char *valid[] = { "top", "bottom", "left", "right" }; | 15 | char *valid[] = { "top", "bottom", "left", "right" }; |
18 | for (size_t i = 0; i < sizeof(valid) / sizeof(valid[0]); ++i) { | 16 | for (size_t i = 0; i < sizeof(valid) / sizeof(valid[0]); ++i) { |
19 | if (strcasecmp(valid[i], argv[0]) == 0) { | 17 | if (strcasecmp(valid[i], argv[0]) == 0) { |
@@ -23,7 +21,6 @@ struct cmd_results *bar_cmd_position(int argc, char **argv) { | |||
23 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 21 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
24 | } | 22 | } |
25 | } | 23 | } |
26 | 24 | return cmd_results_new(CMD_INVALID, | |
27 | error = cmd_results_new(CMD_INVALID, "position", "Invalid value %s", argv[0]); | 25 | "position", "Invalid value %s", argv[0]); |
28 | return error; | ||
29 | } | 26 | } |