projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix unitilialized ret value (revisited)
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
view.c
diff --git
a/src/bin/lttng/commands/view.c
b/src/bin/lttng/commands/view.c
index a146a91cf3131765dee43a258b483725e8d967a2..aa8d612b57e92825e8217e6452c0a3f378aa9a99 100644
(file)
--- a/
src/bin/lttng/commands/view.c
+++ b/
src/bin/lttng/commands/view.c
@@
-48,7
+48,7
@@
static struct poptOption long_options[] = {
/*
* This is needed for each viewer since we are using execvp().
*/
/*
* 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", };
/*
//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.");
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.");
goto error;
} else if (getgid() != getegid()) {
ERR("GID does not match effective GID.");
+ ret = CMD_ERROR;
goto error;
}
}
goto error;
}
}
@@
-327,6
+329,7
@@
static int view_trace(void)
if (!found) {
MSG("Session name %s not found", session_name);
if (!found) {
MSG("Session name %s not found", session_name);
+ ret = CMD_ERROR;
goto free_sessions;
}
goto free_sessions;
}
This page took
0.023835 seconds
and
4
git commands to generate.