From 527288a826bb5602378adccbcd56a4fa8d5dd2bc Mon Sep 17 00:00:00 2001 From: Luminarys Date: Thu, 13 Aug 2015 13:22:20 -0500 Subject: fixes to cmd queue freeing, style --- sway/commands.c | 3 +-- sway/config.c | 2 +- sway/handlers.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'sway') 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) { static bool _do_split(struct sway_config *config, int argc, char **argv, int layout) { char *name = layout == L_VERT ? "splitv": - layout == L_HORIZ ? "splith": - "split"; + layout == L_HORIZ ? "splith":"split"; if (!checkarg(argc, name, EXPECTED_EQUAL_TO, 0)) { return false; } 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) { char *cmd = malloc(strlen(line) + 1); strcpy(cmd, line); list_add(config->cmd_queue, cmd); - }else if (!temp_depth && !handle_command(config, line)) { + } else if (!temp_depth && !handle_command(config, line)) { sway_log(L_DEBUG, "Config load failed for line %s", line); success = false; } 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) { for (i = 0; i < config->cmd_queue->length; ++i) { handle_command(config, config->cmd_queue->items[i]); } - list_free(config->cmd_queue); + free_flat_list(config->cmd_queue); } -- cgit v1.2.3