[gnome-panel] panel-applets-manager-dbus: fix cast-function-type warnings



commit 5a36f459360b5b8a8ae0e854460e5c5898afd6c9
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Sep 13 02:29:05 2018 +0300

    panel-applets-manager-dbus: fix cast-function-type warnings

 .../libpanel-applet-private/panel-applets-manager-dbus.c      | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/gnome-panel/libpanel-applet-private/panel-applets-manager-dbus.c 
b/gnome-panel/libpanel-applet-private/panel-applets-manager-dbus.c
index 4caa41143..81cbb5616 100644
--- a/gnome-panel/libpanel-applet-private/panel-applets-manager-dbus.c
+++ b/gnome-panel/libpanel-applet-private/panel-applets-manager-dbus.c
@@ -69,10 +69,7 @@ panel_applet_factory_info_free (PanelAppletFactoryInfo *info)
 
        g_free (info->id);
        g_free (info->location);
-       g_list_foreach (info->applet_list,
-                       (GFunc) panel_applet_info_free,
-                       NULL);
-       g_list_free (info->applet_list);
+       g_list_free_full (info->applet_list, (GDestroyNotify) panel_applet_info_free);
        info->applet_list = NULL;
        g_free (info->srcdir);
 
@@ -285,8 +282,7 @@ applets_directory_changed (GFileMonitor     *monitor,
         }
     }
 
-  g_slist_foreach (dirs, (GFunc) g_free, NULL);
-  g_slist_free (dirs);
+  g_slist_free_full (dirs, g_free);
 }
 
 static void
@@ -553,8 +549,7 @@ panel_applets_manager_dbus_finalize (GObject *object)
        PanelAppletsManagerDBus *manager = PANEL_APPLETS_MANAGER_DBUS (object);
 
        if (manager->priv->monitors) {
-               g_list_foreach (manager->priv->monitors, (GFunc) g_object_unref, NULL);
-               g_list_free (manager->priv->monitors);
+               g_list_free_full (manager->priv->monitors, g_object_unref);
                manager->priv->monitors = NULL;
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]