diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2022-06-14 15:54:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-14 15:54:27 +0300 |
commit | 72184b533c506e9d74a39f7b349aa712c3773ac3 (patch) | |
tree | 12444301b01110cffe004d6b4c77195942f36e28 /database/rrdlabels.c | |
parent | cc816d29d8b8da478d6c3d17ae22894e44caf88f (diff) |
fixed coveriry 379136 379135 379134 379133 (#13123)
Diffstat (limited to 'database/rrdlabels.c')
-rw-r--r-- | database/rrdlabels.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/database/rrdlabels.c b/database/rrdlabels.c index aaf93eaee8..b26dc11f87 100644 --- a/database/rrdlabels.c +++ b/database/rrdlabels.c @@ -831,8 +831,10 @@ static int rrdlabels_log_label_to_buffer_callback(const char *name, void *value, buffer_sprintf(wb, "Label: %s: \"%s\" (", name, lb->value); size_t sources = 0; - if(lb->label_source & RRDLABEL_SRC_AUTO) - buffer_sprintf(wb, "%sauto", sources++?",":""); + if(lb->label_source & RRDLABEL_SRC_AUTO) { + buffer_sprintf(wb, "auto"); + sources++; + } if(lb->label_source & RRDLABEL_SRC_CONFIG) buffer_sprintf(wb, "%snetdata.conf", sources++?",":""); @@ -968,7 +970,7 @@ int rrdlabels_unittest_add_a_pair_callback(const char *name, const char *value, t->errors++; } else if(strcmp(value, t->expected_value) != 0) { - fprintf(stderr, "values don't match, found \"%s\", expected \"%s\"", value?value:"(null)", t->expected_value?t->expected_value:"(null)"); + fprintf(stderr, "values don't match, found \"%s\", expected \"%s\"", value, t->expected_value); t->errors++; } |