From e5491bf4981934736b43e239404550c3b66bb1f4 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Thu, 29 Mar 2018 18:17:03 -0400 Subject: [PATCH] rename container destroy func --- sway/tree/container.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sway/tree/container.c b/sway/tree/container.c index b41626e19..b343d2362 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -58,18 +58,18 @@ static struct sway_container *new_swayc(enum sway_container_type type) { return c; } -static void free_swayc(struct sway_container *cont) { - if (!sway_assert(cont, "free_swayc passed NULL")) { +static void container_destroy(struct sway_container *cont) { + if (cont == NULL) { return; } wl_signal_emit(&cont->events.destroy, cont); if (cont->children) { - // remove children until there are no more, free_swayc calls + // remove children until there are no more, container_destroy calls // container_remove_child, which removes child from this container while (cont->children->length) { - free_swayc(cont->children->items[0]); + container_destroy(cont->children->items[0]); } list_free(cont->children); } @@ -125,7 +125,7 @@ struct sway_container *container_output_create(struct sway_output *sway_output) output->sway_output = sway_output; output->name = strdup(name); if (output->name == NULL) { - free_swayc(output); + container_destroy(output); return NULL; } @@ -224,7 +224,7 @@ struct sway_container *container_output_destroy(struct sway_container *output) { wl_list_remove(&output->sway_output->mode.link); wlr_log(L_DEBUG, "OUTPUT: Destroying output '%s'", output->name); - free_swayc(output); + container_destroy(output); return &root_container; } @@ -235,7 +235,7 @@ struct sway_container *container_view_destroy(struct sway_container *view) { } wlr_log(L_DEBUG, "Destroying view '%s'", view->name); struct sway_container *parent = view->parent; - free_swayc(view); + container_destroy(view); // TODO WLR: Destroy empty containers /*