projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72d6904
)
statsd plugin: Comparison is always true because status <= -1
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 26 May 2018 15:12:41 +0000
(17:12 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 26 May 2018 15:12:41 +0000
(17:12 +0200)
Found by https://lgtm.com
src/statsd.c
patch
|
blob
|
history
diff --git
a/src/statsd.c
b/src/statsd.c
index
28ee337
..
444e8ea
100644
(file)
--- a/
src/statsd.c
+++ b/
src/statsd.c
@@
-352,9
+352,8
@@
static int statsd_handle_set(char const *name, /* {{{ */
status = c_avl_insert(metric->set, set_key, /* value = */ NULL);
if (status < 0) {
pthread_mutex_unlock(&metrics_lock);
- if (status < 0)
- ERROR("statsd plugin: c_avl_insert (\"%s\") failed with status %i.",
- set_key, status);
+ ERROR("statsd plugin: c_avl_insert (\"%s\") failed with status %i.",
+ set_key, status);
sfree(set_key);
return -1;
} else if (status > 0) /* key already exists */