[gtk+/gtk-3-14] Drop a few unneeded ifs
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] Drop a few unneeded ifs
- Date: Thu, 11 Dec 2014 14:31:12 +0000 (UTC)
commit 023fbb91d6b975003a177f997930492de7298693
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 8 15:38:41 2014 -0500
Drop a few unneeded ifs
It does not hurt to pass NULL to g_list_free().
gtk/gtkappchooserwidget.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkappchooserwidget.c b/gtk/gtkappchooserwidget.c
index ebe1d00..01f9a4b 100644
--- a/gtk/gtkappchooserwidget.c
+++ b/gtk/gtkappchooserwidget.c
@@ -798,17 +798,10 @@ gtk_app_chooser_widget_real_add_items (GtkAppChooserWidget *self)
if (default_app != NULL)
g_object_unref (default_app);
- if (all_applications != NULL)
- g_list_free_full (all_applications, g_object_unref);
-
- if (recommended_apps != NULL)
- g_list_free_full (recommended_apps, g_object_unref);
-
- if (fallback_apps != NULL)
- g_list_free_full (fallback_apps, g_object_unref);
-
- if (exclude_apps != NULL)
- g_list_free (exclude_apps);
+ g_list_free_full (all_applications, g_object_unref);
+ g_list_free_full (recommended_apps, g_object_unref);
+ g_list_free_full (fallback_apps, g_object_unref);
+ g_list_free (exclude_apps);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]