summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2022-07-18 16:33:25 +0300
committerStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2022-07-18 16:33:25 +0300
commiteb560f12e138905a46beea9d35dde9e5fc0561af (patch)
tree123f821bcd0436c56ce6d764fd2bee598626d2f0
parente7653b28a489776c6022e3fabaa26ea9e65beac7 (diff)
Rewrite condition to address CODACY report (Redundant condition: t->filter_callback. '!A || (A && B)' is equivalent to '!A || B')
-rw-r--r--database/rrdlabels.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/database/rrdlabels.c b/database/rrdlabels.c
index 18ea767b05..aa03f630ae 100644
--- a/database/rrdlabels.c
+++ b/database/rrdlabels.c
@@ -900,7 +900,7 @@ static int label_to_buffer_callback(const char *name, void *value, void *data) {
vv = v;
}
- if(!t->filter_callback || (t->filter_callback && t->filter_callback(name, string2str(lb->label_value), lb->label_source, t->filter_data))) {
+ if(!t->filter_callback || t->filter_callback(name, string2str(lb->label_value), lb->label_source, t->filter_data)) {
buffer_sprintf(t->wb, "%s%s%s%s%s%s%s%s%s", t->count++?t->between_them:"", t->before_each, t->quote, nn, t->quote, t->equal, t->quote, vv, t->quote);
return 1;
}