X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fethstat.c;h=4b05300867607135a83c0276e90caf6c0c2113c3;hb=e53a4c2eafacb433e3a189ecada4f521caf6c615;hp=a6635c5761905a1963ed9d74e3f471c5c436378d;hpb=2079ee1517e34de372f58e7e2267ad5c71a8a41f;p=collectd.git diff --git a/src/ethstat.c b/src/ethstat.c index a6635c57..4b053008 100644 --- a/src/ethstat.c +++ b/src/ethstat.c @@ -161,7 +161,6 @@ static void ethstat_submit_value(const char *device, const char *type_instance, derive_t value) { static c_complain_t complain_no_map = C_COMPLAIN_INIT_STATIC; - value_t values[1]; value_list_t vl = VALUE_LIST_INIT; value_map_t *map = NULL; @@ -178,11 +177,9 @@ static void ethstat_submit_value(const char *device, const char *type_instance, return; } - values[0].derive = value; - vl.values = values; + vl.values = &(value_t){.derive = value}; vl.values_len = 1; - sstrncpy(vl.host, hostname_g, sizeof(vl.host)); sstrncpy(vl.plugin, "ethstat", sizeof(vl.plugin)); sstrncpy(vl.plugin_instance, device, sizeof(vl.plugin_instance)); if (map != NULL) { @@ -328,5 +325,3 @@ void module_register(void) { plugin_register_read("ethstat", ethstat_read); plugin_register_shutdown("ethstat", ethstat_shutdown); } - -/* vim: set sw=2 sts=2 et fdm=marker : */