diff options
Diffstat (limited to 'diskstats.c')
-rw-r--r-- | diskstats.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/diskstats.c b/diskstats.c index e622fd3..81231aa 100644 --- a/diskstats.c +++ b/diskstats.c @@ -95,9 +95,9 @@ static void diskstats_collect(scrape_req *req, void *ctx_ptr) { // buffers - const char *labels[][2] = { - { "device", 0 }, // filled by code - { 0, 0 }, + struct label labels[] = { + { .key = "device", .value = 0 }, // value filled by code + LABEL_END, }; char buf[BUF_SIZE]; @@ -123,7 +123,7 @@ static void diskstats_collect(scrape_req *req, void *ctx_ptr) { char *dev = strtok_r(0, " ", &p); if (!dev || *dev == '\0') continue; - labels[0][1] = dev; + labels[0].value = dev; // filter |