diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-07-31 17:57:04 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-07-31 22:23:35 -0400 |
commit | 9f24b54786d8371f77f9ba0c4475ed82b2e0e68f (patch) | |
tree | 8ac32783559f12897ce4e5bbc350ed8aab77e67e /gtk/gtktextchild.c | |
parent | 9dd2645c4a591e154c2e1fe9e6bd5677c56e928a (diff) | |
download | gtk+-9f24b54786d8371f77f9ba0c4475ed82b2e0e68f.tar.gz |
Code cleanup
Use g_slist_free_full more consistently. This commit just converts
the obvious cases where g_slist_forall is directly followed by
g_slist_free.
Diffstat (limited to 'gtk/gtktextchild.c')
-rw-r--r-- | gtk/gtktextchild.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/gtk/gtktextchild.c b/gtk/gtktextchild.c index 61a2bfbc4a..3c075ead08 100644 --- a/gtk/gtktextchild.c +++ b/gtk/gtktextchild.c @@ -345,7 +345,6 @@ static void gtk_text_child_anchor_finalize (GObject *obj) { GtkTextChildAnchor *anchor; - GSList *tmp_list; GtkTextLineSegment *seg; anchor = GTK_TEXT_CHILD_ANCHOR (obj); @@ -361,15 +360,8 @@ gtk_text_child_anchor_finalize (GObject *obj) "and the refcount is 0."); return; } - - tmp_list = seg->body.child.widgets; - while (tmp_list) - { - g_object_unref (tmp_list->data); - tmp_list = g_slist_next (tmp_list); - } - - g_slist_free (seg->body.child.widgets); + + g_slist_free_full (seg->body.child.widgets, g_object_unref); g_slice_free1 (WIDGET_SEG_SIZE, seg); } |