From afcb4675b3a5f658578702e6a0d8dc3c5063a051 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 26 May 2018 17:12:41 +0200 Subject: [PATCH] statsd plugin: Comparison is always true because status <= -1 Found by https://lgtm.com --- src/statsd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/statsd.c b/src/statsd.c index 28ee337c..444e8ea1 100644 --- 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 */ -- 2.11.0