X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fgps.c;h=644967b3b7ec79c2bc4e2c977138dd34086041b3;hb=2ede5e7fd0f7e75edd1fba531cd870bb16092e71;hp=f72cef4961bfa860f2481b0663ce822a36f592ad;hpb=b847e8ff2fd928813397466a941947c8fce66d66;p=collectd.git diff --git a/src/gps.c b/src/gps.c index f72cef49..644967b3 100644 --- a/src/gps.c +++ b/src/gps.c @@ -220,14 +220,10 @@ quit: */ 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));