diff --git a/src/madwifi.c b/src/madwifi.c
index f8065a6d944dc12906a5605e474a001354e8ea33..42474bc7050c313aa967e8c59a7962dccc47fbaa 100644 (file)
--- a/src/madwifi.c
+++ b/src/madwifi.c
@@ -566,10 +566,12 @@ static void submit_derive (const char *dev, const char *type, const char *ti1,
static void submit_derive2 (const char *dev, const char *type, const char *ti1,
const char *ti2, derive_t val1, derive_t val2)
{
- value_t items[2];
- items[0].derive = val1;
- items[1].derive = val2;
- submit (dev, type, ti1, ti2, items, 2);
+ value_t values[] = {
+ { .derive = val1 },
+ { .derive = val2 },
+ };
+
+ submit (dev, type, ti1, ti2, values, STATIC_ARRAY_SIZE (values));
}
static void submit_gauge (const char *dev, const char *type, const char *ti1,