From: David Goulet Date: Thu, 22 Nov 2012 19:04:09 +0000 (-0500) Subject: Fix: Uninit. variable in lttng view X-Git-Tag: v2.1.0-rc8~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3822545da613a8add254dcff34ca879cf8fce7fc;p=lttng-tools.git Fix: Uninit. variable in lttng view Signed-off-by: David Goulet --- diff --git a/src/bin/lttng/commands/view.c b/src/bin/lttng/commands/view.c index dd3c9a3cc..68ee4fa3e 100644 --- a/src/bin/lttng/commands/view.c +++ b/src/bin/lttng/commands/view.c @@ -339,17 +339,17 @@ static int view_trace(void) } trace_path = sessions[i].path; + + if (sessions[i].enabled) { + WARN("Session %s is running. Please stop it before reading it.", + session_name); + ret = CMD_ERROR; + goto free_sessions; + } } else { trace_path = opt_trace_path; } - if (sessions[i].enabled) { - WARN("Session %s is running. Please stop it before reading it.", - session_name); - ret = CMD_ERROR; - goto free_sessions; - } - MSG("Trace directory: %s\n", trace_path); ret = spawn_viewer(trace_path);