summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserwidget.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-07-31 17:57:04 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-07-31 22:23:35 -0400
commit9f24b54786d8371f77f9ba0c4475ed82b2e0e68f (patch)
tree8ac32783559f12897ce4e5bbc350ed8aab77e67e /gtk/gtkfilechooserwidget.c
parent9dd2645c4a591e154c2e1fe9e6bd5677c56e928a (diff)
downloadgtk+-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/gtkfilechooserwidget.c')
-rw-r--r--gtk/gtkfilechooserwidget.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 47f595f0e5..84dc970833 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -1744,8 +1744,7 @@ visit_file_cb (GSimpleAction *action,
gtk_file_chooser_widget_select_file (GTK_FILE_CHOOSER (impl), file, NULL); /* NULL-GError */
}
- g_slist_foreach (files, (GFunc) g_object_unref, NULL);
- g_slist_free (files);
+ g_slist_free_full (files, g_object_unref);
}
/* Callback used when the "Open this folder" menu item is activated */
@@ -1770,8 +1769,7 @@ open_folder_cb (GSimpleAction *action,
g_free (uri);
}
- g_slist_foreach (files, (GFunc) g_object_unref, NULL);
- g_slist_free (files);
+ g_slist_free_full (files, g_object_unref);
}
/* callback used when the "Show Hidden Files" menu item is toggled */
@@ -6694,8 +6692,7 @@ add_selection_to_recent_list (GtkFileChooserWidget *impl)
}
}
- g_slist_foreach (files, (GFunc) g_object_unref, NULL);
- g_slist_free (files);
+ g_slist_free_full (files, g_object_unref);
}
static gboolean