From: Manuel Luis SanmartĂ­n Rozada Date: Fri, 26 Feb 2021 23:31:00 +0000 (+0100) Subject: Change metric_family declaration X-Git-Tag: 6.0.0-rc0~133^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3851%2Fhead;p=thirdparty%2Fcollectd.git Change metric_family declaration --- diff --git a/src/protocols.c b/src/protocols.c index 17f559c88..38be8f71c 100644 --- a/src/protocols.c +++ b/src/protocols.c @@ -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);