if (host != NULL)
sstrncpy (vl.host, host, sizeof (vl.host));
- else
- sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "netapp", sizeof (vl.plugin));
if (plugin_inst != NULL)
sstrncpy (vl.plugin_instance, plugin_inst, sizeof (vl.plugin_instance));
const char *type, const char *type_inst, derive_t val0, derive_t val1,
cdtime_t timestamp, cdtime_t interval)
{
- value_t values[2];
-
- values[0].derive = val0;
- values[1].derive = val1;
+ value_t values[] = {
+ { .derive = val0 },
+ { .derive = val1 },
+ };
return (submit_values (host, plugin_inst, type, type_inst,
- values, 2, timestamp, interval));
+ values, STATIC_ARRAY_SIZE (values), timestamp, interval));
} /* }}} int submit_two_derive */
static int submit_derive (const char *host, const char *plugin_inst, /* {{{ */
const char *type, const char *type_inst, gauge_t val0, gauge_t val1,
cdtime_t timestamp, cdtime_t interval)
{
- value_t values[2];
-
- values[0].gauge = val0;
- values[1].gauge = val1;
+ value_t values[] = {
+ { .gauge = val0 },
+ { .gauge = val1 },
+ };
return (submit_values (host, plugin_inst, type, type_inst,
- values, 2, timestamp, interval));
+ values, STATIC_ARRAY_SIZE (values), timestamp, interval));
} /* }}} int submit_two_gauge */
static int submit_double (const char *host, const char *plugin_inst, /* {{{ */