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/gtkrecentmanager.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/gtkrecentmanager.c')
-rw-r--r-- | gtk/gtkrecentmanager.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c index 471f6d8be8..ce749908a5 100644 --- a/gtk/gtkrecentmanager.c +++ b/gtk/gtkrecentmanager.c @@ -1497,11 +1497,7 @@ gtk_recent_info_free (GtkRecentInfo *recent_info) if (recent_info->applications) { - g_slist_foreach (recent_info->applications, - (GFunc) recent_app_info_free, - NULL); - g_slist_free (recent_info->applications); - + g_slist_free_full (recent_info->applications, (GDestroyNotify)recent_app_info_free); recent_info->applications = NULL; } @@ -1510,11 +1506,7 @@ gtk_recent_info_free (GtkRecentInfo *recent_info) if (recent_info->groups) { - g_slist_foreach (recent_info->groups, - (GFunc) g_free, - NULL); - g_slist_free (recent_info->groups); - + g_slist_free_full (recent_info->groups, g_free); recent_info->groups = NULL; } |