X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsensors.c;h=438cd7464ae09793eb8d52e038b6024519503960;hb=11ca18db12e489c40aa0ac41672872cfae4b1f0b;hp=de2a4f7b9ede16efc6cf917fe0fd9f24ace63210;hpb=da612fa9c6a3343b43789569d64197d7c690be52;p=collectd.git diff --git a/src/sensors.c b/src/sensors.c index de2a4f7b..438cd746 100644 --- a/src/sensors.c +++ b/src/sensors.c @@ -37,7 +37,6 @@ #include "common.h" #include "plugin.h" -#include "configfile.h" #include "utils_ignorelist.h" #if defined(HAVE_SENSORS_SENSORS_H) @@ -482,12 +481,11 @@ static int sensors_shutdown (void) static void sensors_submit (const char *plugin_instance, const char *type, const char *type_instance, - double val) + double value) { char match_key[1024]; int status; - value_t values[1]; value_list_t vl = VALUE_LIST_INIT; status = ssnprintf (match_key, sizeof (match_key), "%s/%s-%s", @@ -502,12 +500,9 @@ static void sensors_submit (const char *plugin_instance, return; } - values[0].gauge = val; - - vl.values = values; + vl.values = &(value_t) { .gauge = value }; vl.values_len = 1; - sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "sensors", sizeof (vl.plugin)); sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));