Fix: src.ctf.fs: init_index_entry() may return uninitialized value
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 6 May 2019 16:20:09 +0000 (12:20 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 7 May 2019 15:48:52 +0000 (11:48 -0400)
Found with scan-build.
Warning reported: Undefined or garbage value returned to caller

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Ifaccdd9f7c8a762fd4eb9f26a5fce4cd092c44df
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1259
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
CI-Build: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins
plugins/ctf/fs-src/data-stream-file.c

index e1041151e6aa094108ce4a9fc86612a456b6cebd..fab87deeac56787ad658107e3b44fd44854216b8 100644 (file)
@@ -490,7 +490,7 @@ int init_index_entry(struct ctf_fs_ds_index_entry *entry,
                struct bt_msg_iter_packet_properties *props,
                off_t packet_size, off_t packet_offset)
 {
-       int ret;
+       int ret = 0;
        struct ctf_stream_class *sc;
 
        sc = ctf_trace_class_borrow_stream_class_by_id(ds_file->metadata->tc,
This page took 0.02512 seconds and 4 git commands to generate.