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/gtkimcontextsimple.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/gtkimcontextsimple.c')
-rw-r--r-- | gtk/gtkimcontextsimple.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c index 8ddbdc42a9..c6ac597eee 100644 --- a/gtk/gtkimcontextsimple.c +++ b/gtk/gtkimcontextsimple.c @@ -138,13 +138,8 @@ gtk_im_context_simple_finalize (GObject *obj) GtkIMContextSimple *context_simple = GTK_IM_CONTEXT_SIMPLE (obj); GtkIMContextSimplePrivate *priv = context_simple->priv; - if (priv->tables) - { - g_slist_foreach (priv->tables, (GFunc)g_free, NULL); - g_slist_free (priv->tables); - - priv->tables = NULL; - } + g_slist_free_full (priv->tables, g_free); + priv->tables = NULL; G_OBJECT_CLASS (gtk_im_context_simple_parent_class)->finalize (obj); } |