From: Ruben Kerkhof Date: Sun, 24 Jul 2016 11:43:48 +0000 (+0200) Subject: apache plugin: fix compiler warning on Solaris X-Git-Tag: collectd-5.6.0~173 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=44760d0d783660a0cd03df07b9017f1a6fd66ddd;p=collectd.git apache plugin: fix compiler warning on Solaris --- diff --git a/src/apache.c b/src/apache.c index 2e91a1be..40d0efe2 100644 --- a/src/apache.c +++ b/src/apache.c @@ -63,8 +63,10 @@ typedef struct apache_s apache_t; /* TODO: Remove this prototype */ static int apache_read_host (user_data_t *user_data); -static void apache_free (apache_t *st) +static void apache_free (void *arg) { + apache_t *st = arg; + if (st == NULL) return; @@ -243,7 +245,7 @@ static int config_add (oconfig_item_t *ci) memset (&ud, 0, sizeof (ud)); ud.data = st; - ud.free_func = (void *) apache_free; + ud.free_func = apache_free; memset (callback_name, 0, sizeof (callback_name)); ssnprintf (callback_name, sizeof (callback_name),