The 'offset' field of the ctf_index is used uninitialized when it is
populated. Its uninitialized value is read and stored back. This is
not a problem as the offset is populated later-on.
Coveity reports
1405630 Uninitialized scalar variable
The variable will contain an arbitrary value left from earlier computations.
In lttng_kconsumer_read_subbuffer: Use of an uninitialized variable (CWE-457)
Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
int err, write_index = 1, rotation_ret;
ssize_t ret = 0;
int infd = stream->wait_fd;
- struct ctf_packet_index index;
+ struct ctf_packet_index index = {};
DBG("In read_subbuffer (infd : %d)", infd);