X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsensors.c;h=f13b3ea18f4c294ed30d0d30030bd5d12614c6e9;hb=1aa4295ba6875ceb02a7383237bc2485ffab9c1e;hp=de2a4f7b9ede16efc6cf917fe0fd9f24ace63210;hpb=e6798095bb2f063dd97619399575fef3e0fe501e;p=collectd.git diff --git a/src/sensors.c b/src/sensors.c index de2a4f7b..f13b3ea1 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,9 +500,7 @@ 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));