diff --git a/src/gps.c b/src/gps.c
index f72cef4961bfa860f2481b0663ce822a36f592ad..644967b3b7ec79c2bc4e2c977138dd34086041b3 100644 (file)
--- a/src/gps.c
+++ b/src/gps.c
*/
static void cgps_submit (const char *type, gauge_t value, const char *type_instance)
{
- value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
- values[0].gauge = value;
-
- vl.values = values;
+ vl.values = &(value_t) { .gauge = value };
vl.values_len = 1;
- sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "gps", sizeof (vl.plugin));
sstrncpy (vl.type, type, sizeof (vl.type));
sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));