diff options
author | AndersBroman <anders.broman@ericsson.com> | 2017-03-02 16:17:56 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-03-02 15:20:05 +0000 |
commit | 2f6ba7534721d643fca84bfce80712daa4fffa3d (patch) | |
tree | 348f08b993f5d286378669a7e897e090b38435e8 /extcap | |
parent | bf28bd4da3c163234dbdccf492601853b697073d (diff) |
Use glib-compat
Change-Id: I510af18d433c4db360243dda72260e59eb84355f
Reviewed-on: https://code.wireshark.org/review/20336
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'extcap')
-rw-r--r-- | extcap/ciscodump.c | 6 | ||||
-rw-r--r-- | extcap/sshdump.c | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/extcap/ciscodump.c b/extcap/ciscodump.c index fda78d86de..fb79240afb 100644 --- a/extcap/ciscodump.c +++ b/extcap/ciscodump.c @@ -28,6 +28,7 @@ #include <wsutil/interface.h> #include <wsutil/strtoi.h> #include <wsutil/filesystem.h> +#include <wsutil/glib-compat.h> #include <extcap/ssh-base.h> #include <writecap/pcapio.h> @@ -113,12 +114,7 @@ static char* local_interfaces_to_filter(const unsigned int remote_port) { GSList* interfaces = local_interfaces_to_list(); char* filter = interfaces_list_to_filter(interfaces, remote_port); -#if GLIB_CHECK_VERSION(2, 28, 0) g_slist_free_full(interfaces, g_free); -#else - g_slist_foreach(interfaces, (GFunc)g_free, NULL); - g_slist_free(interfaces); -#endif return filter; } diff --git a/extcap/sshdump.c b/extcap/sshdump.c index efad9c16d9..525acc2ca0 100644 --- a/extcap/sshdump.c +++ b/extcap/sshdump.c @@ -30,6 +30,7 @@ #include <wsutil/file_util.h> #include <wsutil/strtoi.h> #include <wsutil/filesystem.h> +#include <wsutil/glib-compat.h> #include <errno.h> #include <string.h> @@ -120,12 +121,7 @@ static char* local_interfaces_to_filter(const guint16 remote_port) { GSList* interfaces = local_interfaces_to_list(); char* filter = interfaces_list_to_filter(interfaces, remote_port); -#if GLIB_CHECK_VERSION(2, 28, 0) g_slist_free_full(interfaces, g_free); -#else - g_slist_foreach(interfaces, (GFunc)g_free, NULL); - g_slist_free(interfaces); -#endif return filter; } |