summaryrefslogtreecommitdiff
path: root/libnm-glib
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-02-07 19:18:18 +0000
committerLubomir Rintel <lkundrak@v3.sk>2018-02-08 17:11:46 +0100
commit7f7207f36bc16cd5dc4550b6307efd72c9d623ee (patch)
treea54a6da9bdab13f0cfa71eeace5e222e284462b0 /libnm-glib
parent422e87ec0d08d51c406b12be70d19e725d9cca4d (diff)
libnm/vpn-plugin: avoid bad function pointer type casts
This makes GCC 8.0 unhappy and it is probably right about that -- it's more difficult to get things wrong when the function prototypes actually match.
Diffstat (limited to 'libnm-glib')
-rw-r--r--libnm-glib/nm-vpn-plugin.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libnm-glib/nm-vpn-plugin.c b/libnm-glib/nm-vpn-plugin.c
index 4c4c3161c..316939ca9 100644
--- a/libnm-glib/nm-vpn-plugin.c
+++ b/libnm-glib/nm-vpn-plugin.c
@@ -687,9 +687,17 @@ impl_vpn_plugin_set_failure (NMVPNPlugin *plugin,
/*****************************************************************************/
static void
+_emit_quit (gpointer data, gpointer user_data)
+{
+ NMVPNPlugin *plugin = data;
+
+ nm_vpn_plugin_emit_quit (plugin);
+}
+
+static void
sigterm_handler (int signum)
{
- g_slist_foreach (active_plugins, (GFunc) nm_vpn_plugin_emit_quit, NULL);
+ g_slist_foreach (active_plugins, _emit_quit, NULL);
}
static void