From 7a4820a3f8aeddb9a366560a73c169b953f05ed0 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Sat, 12 Dec 2020 22:37:17 +0100 Subject: [PATCH] Remove GSourceFunc casts Convert the callback into a real GSourceFunc. Signed-off-by: Olaf Hering --- panel-plugin/netload.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panel-plugin/netload.c b/panel-plugin/netload.c index 67888d0..36cf3c4 100644 --- a/panel-plugin/netload.c +++ b/panel-plugin/netload.c @@ -149,8 +149,9 @@ typedef struct static void set_progressbar_csscolor(GtkWidget*, GdkRGBA*); /* ---------------------------------------------------------------------------------------------- */ -static gboolean update_monitors(t_global_monitor *global) +static gboolean update_monitors(gpointer user_data) { + t_global_monitor *global = user_data; char buffer[SUM+1][BUFSIZ]; char buffer_panel[SUM][BUFSIZ]; gchar caption[BUFSIZ]; @@ -284,8 +285,7 @@ static void run_update (t_global_monitor *global) if (global->monitor->options.update_interval > 0) { - global->timeout_id = g_timeout_add( global->monitor->options.update_interval, - (GSourceFunc)update_monitors, global); + global->timeout_id = g_timeout_add(global->monitor->options.update_interval, update_monitors, global); } }