From: Mathieu Desnoyers Date: Tue, 18 Jun 2013 19:38:57 +0000 (-0400) Subject: Remove logically dead code X-Git-Tag: v2.2.0-rc3~13 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3842aa86ec7a7a32abc4e436013a2419b24ecc63;p=lttng-tools.git Remove logically dead code 1019963 Logically dead code In list_sessions: Code can never be reached because of a logical contradiction (CWE-561) Signed-off-by: Mathieu Desnoyers --- diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index db993df75..c96d27c2a 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -624,14 +624,9 @@ static int list_sessions(const char *session_name) MSG("%sTrace path: %s\n", indent4, sessions[i].path); break; } - continue; - } - - MSG(" %d) %s (%s)%s", i + 1, sessions[i].name, sessions[i].path, - active_string(sessions[i].enabled)); - - if (session_found) { - break; + } else { + MSG(" %d) %s (%s)%s", i + 1, sessions[i].name, sessions[i].path, + active_string(sessions[i].enabled)); } }