Fix: Uninit. variable in lttng view
authorDavid Goulet <dgoulet@efficios.com>
Thu, 22 Nov 2012 19:04:09 +0000 (14:04 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 22 Nov 2012 19:04:09 +0000 (14:04 -0500)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng/commands/view.c

index dd3c9a3cc225b06d2ff055fdfb7acdfe0bc141ef..68ee4fa3ea1ec11343f07b40860bf3be03e85a2b 100644 (file)
@@ -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);
This page took 0.026243 seconds and 4 git commands to generate.