]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Change metric_family declaration 3851/head
authorManuel Luis Sanmartín Rozada <manuel.luis@gmail.com>
Fri, 26 Feb 2021 23:31:00 +0000 (00:31 +0100)
committerManuel Luis Sanmartín Rozada <manuel.luis@gmail.com>
Fri, 26 Feb 2021 23:31:00 +0000 (00:31 +0100)
src/protocols.c

index 17f559c885d561e5f4d5b9b907ec4a5f24d63ba5..38be8f71c90239e1bef3cfc5de28356ce6290697 100644 (file)
@@ -57,9 +57,10 @@ static void submit(const char *protocol_name, const char *str_key,
   ssnprintf(fam_name, sizeof(fam_name), "protocols_%s_%s_total", protocol_name,
             str_key);
 
-  metric_family_t fam = {0};
-  fam.type = METRIC_TYPE_COUNTER;
-  fam.name = fam_name;
+  metric_family_t fam = {
+      .name = fam_name,
+      .type = METRIC_TYPE_COUNTER,
+  };
 
   value_t value;
   int status = parse_value(str_value, &value, DS_TYPE_COUNTER);