From 3822545da613a8add254dcff34ca879cf8fce7fc Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 22 Nov 2012 14:04:09 -0500 Subject: [PATCH] Fix: Uninit. variable in lttng view Signed-off-by: David Goulet --- src/bin/lttng/commands/view.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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); -- 2.34.1