X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fmultimeter.c;h=93ab3d29a31617ba2387c0fbd8d68780879aa604;hb=79ca67ff20812ad81605c3419306c9e39e139198;hp=da1a8c86c754cc143f6f14c85217dc42182b0969;hpb=79963d13c1884d1d92667cc502ad20758b084a12;p=collectd.git diff --git a/src/multimeter.c b/src/multimeter.c index da1a8c86..93ab3d29 100644 --- a/src/multimeter.c +++ b/src/multimeter.c @@ -27,8 +27,7 @@ #include "common.h" #include "plugin.h" -#if HAVE_TERMIOS_H && HAVE_SYS_IOCTL_H && HAVE_MATH_H -#include +#if HAVE_TERMIOS_H && HAVE_SYS_IOCTL_H #include #include #else @@ -185,14 +184,10 @@ static int multimeter_init(void) { #undef LINE_LENGTH static void multimeter_submit(double 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, "multimeter", sizeof(vl.plugin)); sstrncpy(vl.type, "multimeter", sizeof(vl.type));