diff options
author | 2015-08-13 13:22:20 -0500 | |
---|---|---|
committer | 2015-08-13 14:41:36 -0500 | |
commit | 527288a826bb5602378adccbcd56a4fa8d5dd2bc (patch) | |
tree | dac4865cdeeb2315ead145c1be0e9aeeabf07080 | |
parent | Typo fix (diff) | |
download | sway-527288a826bb5602378adccbcd56a4fa8d5dd2bc.tar.gz sway-527288a826bb5602378adccbcd56a4fa8d5dd2bc.tar.zst sway-527288a826bb5602378adccbcd56a4fa8d5dd2bc.zip |
fixes to cmd queue freeing, style
-rw-r--r-- | sway/commands.c | 3 | ||||
-rw-r--r-- | sway/config.c | 2 | ||||
-rw-r--r-- | sway/handlers.c | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands.c b/sway/commands.c index a370e83a..000b6c45 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -229,8 +229,7 @@ static bool cmd_set(struct sway_config *config, int argc, char **argv) { | |||
229 | 229 | ||
230 | static bool _do_split(struct sway_config *config, int argc, char **argv, int layout) { | 230 | static bool _do_split(struct sway_config *config, int argc, char **argv, int layout) { |
231 | char *name = layout == L_VERT ? "splitv": | 231 | char *name = layout == L_VERT ? "splitv": |
232 | layout == L_HORIZ ? "splith": | 232 | layout == L_HORIZ ? "splith":"split"; |
233 | "split"; | ||
234 | if (!checkarg(argc, name, EXPECTED_EQUAL_TO, 0)) { | 233 | if (!checkarg(argc, name, EXPECTED_EQUAL_TO, 0)) { |
235 | return false; | 234 | return false; |
236 | } | 235 | } |
diff --git a/sway/config.c b/sway/config.c index aeadc9a1..869fa077 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -77,7 +77,7 @@ struct sway_config *read_config(FILE *file, bool is_active) { | |||
77 | char *cmd = malloc(strlen(line) + 1); | 77 | char *cmd = malloc(strlen(line) + 1); |
78 | strcpy(cmd, line); | 78 | strcpy(cmd, line); |
79 | list_add(config->cmd_queue, cmd); | 79 | list_add(config->cmd_queue, cmd); |
80 | }else if (!temp_depth && !handle_command(config, line)) { | 80 | } else if (!temp_depth && !handle_command(config, line)) { |
81 | sway_log(L_DEBUG, "Config load failed for line %s", line); | 81 | sway_log(L_DEBUG, "Config load failed for line %s", line); |
82 | success = false; | 82 | success = false; |
83 | } | 83 | } |
diff --git a/sway/handlers.c b/sway/handlers.c index fd9c61a0..4411b947 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -169,7 +169,7 @@ static void handle_wlc_ready(void) { | |||
169 | for (i = 0; i < config->cmd_queue->length; ++i) { | 169 | for (i = 0; i < config->cmd_queue->length; ++i) { |
170 | handle_command(config, config->cmd_queue->items[i]); | 170 | handle_command(config, config->cmd_queue->items[i]); |
171 | } | 171 | } |
172 | list_free(config->cmd_queue); | 172 | free_flat_list(config->cmd_queue); |
173 | } | 173 | } |
174 | 174 | ||
175 | 175 | ||