From: Jérémie Galarneau Date: Fri, 31 Jan 2020 22:56:26 +0000 (-0500) Subject: Clean-up: consumerd: remove unreachable code X-Git-Tag: v2.12.0-rc1~11 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=c585b4b94a2f517485cdf1c2f3efe8d26e44b05d Clean-up: consumerd: remove unreachable code 1412204 Logically dead code The indicated dead code may have performed some action; that action will never occur. In consumer_clear_unmonitored_channel: Code can never be reached because of a logical contradiction (CWE-561) Reported-by: Coverity Scan Signed-off-by: Jérémie Galarneau Change-Id: I116ba5127bf30d3cee1e5f002d7360bc4bc22098 --- diff --git a/src/common/consumer/consumer.c b/src/common/consumer/consumer.c index b649d198a..c6eb71d57 100644 --- a/src/common/consumer/consumer.c +++ b/src/common/consumer/consumer.c @@ -4272,11 +4272,6 @@ error_unlock: pthread_mutex_unlock(&stream->lock); pthread_mutex_unlock(&channel->lock); rcu_read_unlock(); - if (ret) { - goto error; - } - ret = LTTCOMM_CONSUMERD_SUCCESS; -error: return ret; }