Fix unitilialized ret value (revisited)
[lttng-tools.git] / src / bin / lttng / commands / view.c
index a146a91cf3131765dee43a258b483725e8d967a2..aa8d612b57e92825e8217e6452c0a3f378aa9a99 100644 (file)
@@ -48,7 +48,7 @@ static struct poptOption long_options[] = {
 /*
  * This is needed for each viewer since we are using execvp().
  */
-static const char *babeltrace_opts[] = { "babeltrace", "-n", "all", };
+static const char *babeltrace_opts[] = { "babeltrace" };
 //static const char *lttv_gui_opts[] = { "lttv-gui", "-t", };
 
 /*
@@ -288,9 +288,11 @@ static int view_trace(void)
        if (getuid() != 0) {
                if (getuid() != geteuid()) {
                        ERR("UID does not match effective UID.");
+                       ret = CMD_ERROR;
                        goto error;
                } else if (getgid() != getegid()) {
                        ERR("GID does not match effective GID.");
+                       ret = CMD_ERROR;
                        goto error;
                }
        }
@@ -327,6 +329,7 @@ static int view_trace(void)
 
        if (!found) {
                MSG("Session name %s not found", session_name);
+               ret = CMD_ERROR;
                goto free_sessions;
        }
 
This page took 0.023341 seconds and 4 git commands to generate.