const char *type,
derive_t read, derive_t write)
{
- value_t values[2];
value_list_t vl = VALUE_LIST_INIT;
-
- values[0].derive = read;
- values[1].derive = write;
+ value_t values[] = {
+ { .derive = read },
+ { .derive = write },
+ };
vl.values = values;
- vl.values_len = 2;
- sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+ vl.values_len = STATIC_ARRAY_SIZE (values);
sstrncpy (vl.plugin, "tape", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, plugin_instance,
sizeof (vl.plugin_instance));