Fix: lttng_syscall_filter_enable_event(): uninitialized ret variable
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 14 Mar 2022 14:58:08 +0000 (10:58 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 14 Mar 2022 15:38:24 +0000 (11:38 -0400)
Found by Coverity:

** CID 1476253:  Uninitialized variables  (UNINIT)
/src/lttng-syscalls.c: 1057 in lttng_syscall_filter_enable_event()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ie49ef12681efaf7613501a2208cad26951177edd

src/lttng-syscalls.c

index d5e5df4a9bb9575d6417667ffffe9de2aa75ada2..a49a253caa25854f5a73800da2982dbaf5584fc3 100644 (file)
@@ -975,7 +975,7 @@ int lttng_syscall_filter_enable_event(struct lttng_kernel_event_common *event)
        struct lttng_kernel_syscall_table *syscall_table = get_syscall_table_from_event(event);
        unsigned int syscall_id = event->priv->u.syscall.syscall_id;
        struct hlist_head *dispatch_list;
-       int ret;
+       int ret = 0;
 
        WARN_ON_ONCE(event->priv->instrumentation != LTTNG_KERNEL_ABI_SYSCALL);
 
This page took 0.029645 seconds and 4 git commands to generate.