X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fuptime.c;h=f0e1a6f42df4c48106a128ab2227037aa56f7171;hb=d7ad0d6a5533eacd589a1293f19905d8eeabbf39;hp=4116b810fc176c2a73ec7aa6bf807cc8971ab8d9;hpb=69b8a9a1af204685dfdfaf1279a0f2928e0bbb32;p=collectd.git diff --git a/src/uptime.c b/src/uptime.c index 4116b810..f0e1a6f4 100644 --- a/src/uptime.c +++ b/src/uptime.c @@ -20,6 +20,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" @@ -57,17 +58,13 @@ static time_t boottime; extern kstat_ctl_t *kc; #endif /* #endif HAVE_LIBKSTAT */ -static void uptime_submit (gauge_t uptime) +static void uptime_submit (gauge_t value) { - value_t values[1]; value_list_t vl = VALUE_LIST_INIT; - values[0].gauge = uptime; - - vl.values = values; + vl.values = &(value_t) { .gauge = value }; vl.values_len = 1; - sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "uptime", sizeof (vl.plugin)); sstrncpy (vl.type, "uptime", sizeof (vl.type));