X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fping.c;h=64408491d410c71b7d4f6322b60de8175139660c;hb=c76419c0cf983f1ecd3d36aa236cc4e3f9cff733;hp=5f66aab341f552cadb2d786bde09784d2272b2be;hpb=9c962b99a3acd77f1d6e2499052b47356819511a;p=collectd.git diff --git a/src/ping.c b/src/ping.c index 5f66aab3..64408491 100644 --- a/src/ping.c +++ b/src/ping.c @@ -615,16 +615,11 @@ static int ping_config (const char *key, const char *value) /* {{{ */ static void submit (const char *host, const char *type, /* {{{ */ gauge_t value) { - value_t values[1]; value_list_t vl = VALUE_LIST_INIT; - values[0].gauge = value; - - vl.values = values; + vl.values = &(value_t) { .gauge = value }; vl.values_len = 1; - sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "ping", sizeof (vl.plugin)); - sstrncpy (vl.plugin_instance, "", sizeof (vl.plugin_instance)); sstrncpy (vl.type_instance, host, sizeof (vl.type_instance)); sstrncpy (vl.type, type, sizeof (vl.type));