Fix: sessiond: trace-kernel: function return code overwritten
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 9 Feb 2021 21:04:05 +0000 (16:04 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 9 Feb 2021 23:39:30 +0000 (18:39 -0500)
commit366a83b3757c2adb764f2fab95247d5c0d1cf668
tree0b226b0f5b9115cf9e7188dce97d4d4a91b93681
parentc7e9ffbd609dd9ea07e4556e8a20bbd72916ee29
Fix: sessiond: trace-kernel: function return code overwritten

A string copy, performed using `lttng_strncpy` is performed at the end
of trace_kernel_init_event_notifier_from_event_rule() and its return
value is stored in the function's `ret` variable, which is of type `enum
lttng_error_code`.

Since LTTNG_OK is not == 0, the return value is interpreted as an error,
which causes the registration of kernel-domain on-event-hit triggers
to fail.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ia0bf6eb3d2a4fca8f9089ecd4fef7a311354560c
src/bin/lttng-sessiond/trace-kernel.c
This page took 0.026008 seconds and 4 git commands to generate.