X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ffhcount.c;h=92107839218efc0105b389584a1ca7db29bddc09;hb=98e38add333bfcb893fcde408ecf3a0c43d99e31;hp=3fbabf0da0a51e51017863f53e9dc2c542db3692;hpb=79963d13c1884d1d92667cc502ad20758b084a12;p=collectd.git diff --git a/src/fhcount.c b/src/fhcount.c index 3fbabf0d..92107839 100644 --- a/src/fhcount.c +++ b/src/fhcount.c @@ -54,17 +54,12 @@ static int fhcount_config(const char *key, const char *value) { static void fhcount_submit(const char *type, const char *type_instance, 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; // Compose the metric - sstrncpy(vl.host, hostname_g, sizeof(vl.host)); sstrncpy(vl.plugin, "fhcount", sizeof(vl.plugin)); sstrncpy(vl.type, type, sizeof(vl.type)); sstrncpy(vl.type_instance, type_instance, sizeof(vl.type_instance));