X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fapple_sensors.c;h=902b5f96ed658aedac0d079432435d3faa4c3d90;hb=295947714f23935be771c98f1071564d5567d33a;hp=d15bec42e2620f39d197236e3b18ca8a33fcf98a;hpb=2079ee1517e34de372f58e7e2267ad5c71a8a41f;p=collectd.git diff --git a/src/apple_sensors.c b/src/apple_sensors.c index d15bec42..902b5f96 100644 --- a/src/apple_sensors.c +++ b/src/apple_sensors.c @@ -29,10 +29,6 @@ #include "common.h" #include "plugin.h" -#if HAVE_CTYPE_H -#include -#endif - #if HAVE_MACH_MACH_TYPES_H #include #endif @@ -76,18 +72,11 @@ static int as_init(void) { } static void as_submit(const char *type, const char *type_instance, double val) { - value_t values[1]; value_list_t vl = VALUE_LIST_INIT; - DEBUG("type = %s; type_instance = %s; val = %f;", type, type_instance, val); - - values[0].gauge = val; - - vl.values = values; + vl.values = &(value_t){.gauge = val}; vl.values_len = 1; - sstrncpy(vl.host, hostname_g, sizeof(vl.host)); sstrncpy(vl.plugin, "apple_sensors", sizeof(vl.plugin)); - sstrncpy(vl.plugin_instance, "", sizeof(vl.plugin_instance)); sstrncpy(vl.type, type, sizeof(vl.type)); sstrncpy(vl.type_instance, type_instance, sizeof(vl.type_instance));