From: Jonathan Rajotte Date: Tue, 1 Mar 2022 14:03:45 +0000 (-0500) Subject: Fix: lttng-sessiond: nb_events is uninitialized X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=238312393a8fad75330639148e42e5c3662ebb93;p=lttng-tools.git Fix: lttng-sessiond: nb_events is uninitialized Reported by Coverity: CID 1475823: Uninitialized scalar variable (UNINIT) Using uninitialized value nb_events. Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau Change-Id: I623b1ed0c1ef9b4acddb1e46e7311dfcdc974629 --- diff --git a/src/bin/lttng-sessiond/cmd.cpp b/src/bin/lttng-sessiond/cmd.cpp index 0627ba5c8..ad3bbb387 100644 --- a/src/bin/lttng-sessiond/cmd.cpp +++ b/src/bin/lttng-sessiond/cmd.cpp @@ -3830,7 +3830,7 @@ enum lttng_error_code cmd_list_events(enum lttng_domain_type domain, enum lttng_error_code ret_code = LTTNG_OK; struct lttcomm_list_command_header reply_command_header = {}; size_t reply_command_header_offset; - unsigned int nb_events; + unsigned int nb_events = 0; assert(reply_payload);