Tree wide: Unify initialization of multi-value value lists.
[collectd.git] / src / mysql.c
index d9826d9..a64b0e5 100644 (file)
@@ -379,10 +379,10 @@ static void derive_submit (const char *type, const char *type_instance,
 
 static void traffic_submit (derive_t rx, derive_t tx, mysql_database_t *db)
 {
-       value_t values[2];
-
-       values[0].derive = rx;
-       values[1].derive = tx;
+       value_t values[] = {
+               { .derive = rx },
+               { .derive = tx },
+       };
 
        submit ("mysql_octets", NULL, values, STATIC_ARRAY_SIZE (values), db);
 } /* void traffic_submit */