X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fethstat.c;h=6dccb45f14fb7afe536cd8dc5807b5dd6b56ecca;hb=c442c66d9e98852f1b8eaa1b816d6ee7f84d0342;hp=a213b60a684a0b5652328912957ab797dc2e8737;hpb=6159b6f81403b90eb2b1f1c60fa8006cd3405d1b;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)