From: Jérémie Galarneau Date: Fri, 31 Jan 2020 23:22:22 +0000 (-0500) Subject: Clean-up: mi: remove logically dead code X-Git-Tag: v2.12.0-rc1~6 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=f5112e978f61eb82bf487cfa9efa2de359d37661;hp=83fa31bf7c7ba6cb7837e35762059a090343f376 Clean-up: mi: remove logically dead code 1412199 Logically dead code The indicated dead code may have performed some action; that action will never occur. In mi_lttng_id_target: Code can never be reached because of a logical contradiction (CWE-561) Signed-off-by: Jérémie Galarneau Change-Id: I8279cd1e6ab5bc86bd4ea4ca8ac721ad1e31e02b --- diff --git a/src/common/mi-lttng.c b/src/common/mi-lttng.c index bd5049efe..f9f1e225a 100644 --- a/src/common/mi-lttng.c +++ b/src/common/mi-lttng.c @@ -1743,9 +1743,6 @@ int mi_lttng_id_target(struct mi_writer *writer, ret = -LTTNG_ERR_INVALID; goto end; } - if (ret) { - goto end; - } if (!is_open) { ret = mi_lttng_writer_close_element(writer);