From 2f6ba7534721d643fca84bfce80712daa4fffa3d Mon Sep 17 00:00:00 2001 From: AndersBroman Date: Thu, 2 Mar 2017 16:17:56 +0100 Subject: Use glib-compat Change-Id: I510af18d433c4db360243dda72260e59eb84355f Reviewed-on: https://code.wireshark.org/review/20336 Reviewed-by: Anders Broman --- epan/dissectors/packet-zbee-nwk.c | 6 +----- epan/tap.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'epan') diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c index c6ea51afdc..667eafb716 100644 --- a/epan/dissectors/packet-zbee-nwk.c +++ b/epan/dissectors/packet-zbee-nwk.c @@ -36,6 +36,7 @@ #include "packet-zbee.h" #include "packet-zbee-nwk.h" #include "packet-zbee-security.h" +#include /*************************/ /* Function Declarations */ @@ -2243,12 +2244,7 @@ static void free_keyring_key(gpointer key) static void free_keyring_val(gpointer a) { GSList **slist = (GSList **)a; -#if GLIB_CHECK_VERSION(2, 28, 0) g_slist_free_full(*slist, g_free); -#else - g_slist_foreach(*slist, (GFunc)g_free, NULL); - g_slist_free(*slist); -#endif /* GLIB_CHECK_VERSION(2, 28, 0) */ g_free(slist); } diff --git a/epan/tap.c b/epan/tap.c index 77e6ffcaa7..87f46aca38 100644 --- a/epan/tap.c +++ b/epan/tap.c @@ -40,6 +40,7 @@ #include #include #include /* ws_g_warning */ +#include static gboolean tapping_is_active=FALSE; @@ -772,12 +773,7 @@ void tap_cleanup(void) } #ifdef HAVE_PLUGINS -#if GLIB_CHECK_VERSION(2, 28, 0) g_slist_free_full(tap_plugins, tap_plugin_destroy); -#else - g_slist_foreach(tap_plugins, (GFunc)tap_plugin_destroy, NULL); - g_slist_free(tap_plugins); -#endif #endif /* HAVE_PLUGINS */ } -- cgit v1.2.3