projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: tests: gen-ust-events-ns: Uninitialized argument value
[lttng-tools.git]
/
tests
/
utils
/
testapp
/
gen-ust-events-ns
/
gen-ust-events-ns.c
diff --git
a/tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.c
b/tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.c
index c5f25dd7bb1308cc17f34492052e0d2ed339a7dd..2a3c7a45f38a4e713ed6c963610787367b2ba611 100644
(file)
--- a/
tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.c
+++ b/
tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.c
@@
-88,7
+88,7
@@
static void debug_printf(const char *format, ...)
static int get_ns_inum(const char *ns, ino_t *ns_inum)
{
static int get_ns_inum(const char *ns, ino_t *ns_inum)
{
- int ret =
0
;
+ int ret =
-1
;
struct stat sb;
char proc_ns_path[LTTNG_PROC_NS_PATH_MAX];
struct stat sb;
char proc_ns_path[LTTNG_PROC_NS_PATH_MAX];
@@
-99,8
+99,7
@@
static int get_ns_inum(const char *ns, ino_t *ns_inum)
"/proc/thread-self/ns/%s", ns) >= 0) {
if (stat(proc_ns_path, &sb) == 0) {
*ns_inum = sb.st_ino;
"/proc/thread-self/ns/%s", ns) >= 0) {
if (stat(proc_ns_path, &sb) == 0) {
*ns_inum = sb.st_ino;
- } else {
- ret = -1;
+ ret = 0;
}
goto end;
}
}
goto end;
}
@@
-109,8
+108,7
@@
static int get_ns_inum(const char *ns, ino_t *ns_inum)
"/proc/self/task/%d/%s/net", lttng_gettid(), ns) >= 0) {
if (stat(proc_ns_path, &sb) == 0) {
*ns_inum = sb.st_ino;
"/proc/self/task/%d/%s/net", lttng_gettid(), ns) >= 0) {
if (stat(proc_ns_path, &sb) == 0) {
*ns_inum = sb.st_ino;
- } else {
- ret = -1;
+ ret = 0;
}
goto end;
}
}
goto end;
}
This page took
0.023317 seconds
and
4
git commands to generate.