projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: ret is never used on error_open code path
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
main.c
diff --git
a/src/bin/lttng-sessiond/main.c
b/src/bin/lttng-sessiond/main.c
index 172f8c270d5b633466ace52d70fdcf3f3f061318..57a73a84731373a20a94cd2f4b9de20966ac859f 100644
(file)
--- a/
src/bin/lttng-sessiond/main.c
+++ b/
src/bin/lttng-sessiond/main.c
@@
-564,8
+564,7
@@
static void wait_consumer(struct consumer_data *consumer_data)
ret = waitpid(consumer_data->pid, &status, 0);
if (ret == -1) {
PERROR("consumerd waitpid pid: %d", consumer_data->pid)
ret = waitpid(consumer_data->pid, &status, 0);
if (ret == -1) {
PERROR("consumerd waitpid pid: %d", consumer_data->pid)
- }
- if (!WIFEXITED(status)) {
+ } else if (!WIFEXITED(status)) {
ERR("consumerd termination with error: %d",
WEXITSTATUS(ret));
}
ERR("consumerd termination with error: %d",
WEXITSTATUS(ret));
}
@@
-1869,12
+1868,16
@@
static void *thread_dispatch_ust_registration(void *data)
DBG("[thread] Dispatch UST command started");
DBG("[thread] Dispatch UST command started");
-
while (!CMM_LOAD_SHARED(dispatch_thread_exit)
) {
+
for (;;
) {
health_code_update();
/* Atomically prepare the queue futex */
futex_nto1_prepare(&ust_cmd_queue.futex);
health_code_update();
/* Atomically prepare the queue futex */
futex_nto1_prepare(&ust_cmd_queue.futex);
+ if (CMM_LOAD_SHARED(dispatch_thread_exit)) {
+ break;
+ }
+
do {
struct ust_app *app = NULL;
ust_cmd = NULL;
do {
struct ust_app *app = NULL;
ust_cmd = NULL;
@@
-2523,7
+2526,7
@@
static pid_t spawn_consumerd(struct consumer_data *consumer_data)
} else {
DBG("Could not find any valid consumerd executable");
ret = -EINVAL;
} else {
DBG("Could not find any valid consumerd executable");
ret = -EINVAL;
-
break
;
+
goto error
;
}
DBG("Using kernel consumer at: %s", consumer_to_use);
ret = execl(consumer_to_use,
}
DBG("Using kernel consumer at: %s", consumer_to_use);
ret = execl(consumer_to_use,
@@
-2713,7
+2716,6
@@
static int init_kernel_tracer(void)
kernel_tracer_fd = open(module_proc_lttng, O_RDWR);
if (kernel_tracer_fd < 0) {
DBG("Failed to open %s", module_proc_lttng);
kernel_tracer_fd = open(module_proc_lttng, O_RDWR);
if (kernel_tracer_fd < 0) {
DBG("Failed to open %s", module_proc_lttng);
- ret = -1;
goto error_open;
}
goto error_open;
}
This page took
0.028487 seconds
and
4
git commands to generate.