X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fethstat.c;h=6dccb45f14fb7afe536cd8dc5807b5dd6b56ecca;hb=77ad300d75ce59bf4d49d839a2af72e90590033c;hp=a213b60a684a0b5652328912957ab797dc2e8737;hpb=958f7776a2daaa1a8664aded0a2c1d717c2f5909;p=collectd.git diff --git a/src/ethstat.c b/src/ethstat.c index a213b60a..6dccb45f 100644 --- a/src/ethstat.c +++ b/src/ethstat.c @@ -26,7 +26,6 @@ #include "common.h" #include "plugin.h" -#include "configfile.h" #include "utils_avltree.h" #include "utils_complain.h" @@ -173,7 +172,6 @@ static void ethstat_submit_value (const char *device, { 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; @@ -190,11 +188,9 @@ static void ethstat_submit_value (const char *device, 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)