X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Flpar.c;h=69a56e1cdea3e9508c0b3bc14ab5aace5a622deb;hb=db8b1cda4841f45af22d149c6bfc575e79289f75;hp=4d534476f62c76754433b2c73d313967595e5843;hpb=f1ba2733d2c58fed90c13e9ae31cb7c1f3c5613e;p=collectd.git diff --git a/src/lpar.c b/src/lpar.c index 4d534476..69a56e1c 100644 --- a/src/lpar.c +++ b/src/lpar.c @@ -20,6 +20,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" @@ -113,22 +114,15 @@ static int lpar_init (void) static void lpar_submit (const char *type_instance, double value) { - value_t values[1]; value_list_t vl = VALUE_LIST_INIT; - values[0].gauge = (gauge_t)value; - - vl.values = values; + vl.values = &(value_t) { .gauge = value }; vl.values_len = 1; if (report_by_serial) { sstrncpy (vl.host, serial, sizeof (vl.host)); sstrncpy (vl.plugin_instance, hostname_g, sizeof (vl.plugin)); } - else - { - sstrncpy (vl.host, hostname_g, sizeof (vl.host)); - } sstrncpy (vl.plugin, "lpar", sizeof (vl.plugin)); sstrncpy (vl.type, "vcpu", sizeof (vl.type)); sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));