X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fwireless.c;h=ae77ded869a44bbb64c038ae0103301c93e5705b;hb=877672d20fcf0ed25f5fc5faa8aa3964c622bc27;hp=80cd994c73394d90fcf8268b61bd52d194b2cabe;hpb=79963d13c1884d1d92667cc502ad20758b084a12;p=collectd.git diff --git a/src/wireless.c b/src/wireless.c index 80cd994c..ae77ded8 100644 --- a/src/wireless.c +++ b/src/wireless.c @@ -53,14 +53,10 @@ static double wireless_dbm_to_watt (double dbm) static void wireless_submit(const char *plugin_instance, const char *type, 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, "wireless", sizeof(vl.plugin)); sstrncpy(vl.plugin_instance, plugin_instance, sizeof(vl.plugin_instance)); sstrncpy(vl.type, type, sizeof(vl.type));