X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Flpar.c;h=c01922791d01ae6000622f20ed195ddae3d6b897;hb=4ebf1f93bbf273cb3833c333c101ee6b9aea6bc1;hp=412a721ab3707f3d448f13692599e2fc705855f6;hpb=79963d13c1884d1d92667cc502ad20758b084a12;p=collectd.git diff --git a/src/lpar.c b/src/lpar.c index 412a721a..c0192279 100644 --- a/src/lpar.c +++ b/src/lpar.c @@ -99,18 +99,13 @@ static int lpar_init(void) { } /* int lpar_init */ 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)); @@ -248,5 +243,3 @@ void module_register(void) { plugin_register_init("lpar", lpar_init); plugin_register_read("lpar", lpar_read); } /* void module_register */ - -/* vim: set sw=8 noet : */