From: Florian Forster Date: Wed, 18 Aug 2010 08:21:49 +0000 (+0200) Subject: collectdctl: Fix problems with strict aliasing. X-Git-Tag: collectd-5.0.0-beta0~48 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e216f303206f269ba89bb4be32ffcb7eb15ca289;p=collectd.git collectdctl: Fix problems with strict aliasing. --- diff --git a/src/collectdctl.c b/src/collectdctl.c index 53bd6184..60b1e64e 100644 --- a/src/collectdctl.c +++ b/src/collectdctl.c @@ -254,7 +254,7 @@ static int flush (lcc_connection_t *c, int argc, char **argv) } } else if (strcasecmp (key, "plugin") == 0) { - status = array_grow ((void **)&plugins, &plugins_num, + status = array_grow ((void *)&plugins, &plugins_num, sizeof (*plugins)); if (status != 0) BAIL_OUT (status); @@ -262,7 +262,7 @@ static int flush (lcc_connection_t *c, int argc, char **argv) plugins[plugins_num - 1] = value; } else if (strcasecmp (key, "identifier") == 0) { - status = array_grow ((void **)&identifiers, &identifiers_num, + status = array_grow ((void *)&identifiers, &identifiers_num, sizeof (*identifiers)); if (status != 0) BAIL_OUT (status); @@ -280,7 +280,7 @@ static int flush (lcc_connection_t *c, int argc, char **argv) } if (plugins_num == 0) { - status = array_grow ((void **)&plugins, &plugins_num, sizeof (*plugins)); + status = array_grow ((void *)&plugins, &plugins_num, sizeof (*plugins)); if (status != 0) BAIL_OUT (status);