From 772008f3df9a70366dee36668695359c0a3f1af3 Mon Sep 17 00:00:00 2001 From: elene-margalit Date: Sun, 16 Aug 2020 19:31:16 +0200 Subject: [PATCH] Formatted the code. --- src/daemon/metric.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/daemon/metric.c b/src/daemon/metric.c index 2196b36ff..2d9f93810 100644 --- a/src/daemon/metric.c +++ b/src/daemon/metric.c @@ -205,7 +205,7 @@ int metric_reset(metric_t *m) { label_set_reset(&m->label); meta_data_destroy(m->meta); - if(m->family->type == METRIC_TYPE_DISTRIBUTION) { + if (m->family->type == METRIC_TYPE_DISTRIBUTION) { distribution_destroy(m->value.distribution); } @@ -349,18 +349,18 @@ static int metric_list_clone(metric_list_t *dest, metric_list_t src, for (size_t i = 0; i < src.num; i++) { - ret.ptr[i] = (metric_t){ + ret.ptr[i] = (metric_t){ .family = fam, .time = src.ptr[i].time, .interval = src.ptr[i].interval, - }; + }; - if(src.ptr[i].family->type == METRIC_TYPE_DISTRIBUTION) { - ret.ptr[i].value.distribution = distribution_clone(src.ptr[i].value.distribution); - } - else { - ret.ptr[i].value = src.ptr[i].value; - } + if (src.ptr[i].family->type == METRIC_TYPE_DISTRIBUTION) { + ret.ptr[i].value.distribution = + distribution_clone(src.ptr[i].value.distribution); + } else { + ret.ptr[i].value = src.ptr[i].value; + } int status = label_set_clone(&ret.ptr[i].label, src.ptr[i].label); if (status != 0) { @@ -633,4 +633,3 @@ metric_t *metric_parse_identity(char const *buf) { return fam->metric.ptr; } - -- 2.47.2