From: Simon Marchi Date: Mon, 13 Jun 2022 16:47:53 +0000 (-0400) Subject: src.ctf.fs: initialize ctf_fs_ds_index_entry::packet_seq_num to UINT64_MAX in class X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=8bcfc7d7e002a06ab76ab18d387c203fc7c63264 src.ctf.fs: initialize ctf_fs_ds_index_entry::packet_seq_num to UINT64_MAX in class Initialize the field directly to the right value. The field was originally initialized to 0 to mimic the g_new0 behavior. Change-Id: Ia1df1be730b77ca0d69ae05dae12bd60ef9e9ed8 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/8346 Reviewed-by: Philippe Proulx Reviewed-on: https://review.lttng.org/c/babeltrace/+/12341 Tested-by: jenkins --- diff --git a/src/plugins/ctf/fs-src/data-stream-file.cpp b/src/plugins/ctf/fs-src/data-stream-file.cpp index aa36c7c6..3eb3604e 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.cpp +++ b/src/plugins/ctf/fs-src/data-stream-file.cpp @@ -384,8 +384,6 @@ static ctf_fs_ds_index_entry::UP ctf_fs_ds_index_entry_create(const bt2c::DataLe { ctf_fs_ds_index_entry::UP entry = bt2s::make_unique(offset, packetSize); - entry->packet_seq_num = UINT64_MAX; - return entry; } diff --git a/src/plugins/ctf/fs-src/data-stream-file.hpp b/src/plugins/ctf/fs-src/data-stream-file.hpp index e5418ced..10c97a5e 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.hpp +++ b/src/plugins/ctf/fs-src/data-stream-file.hpp @@ -111,7 +111,7 @@ struct ctf_fs_ds_index_entry /* * Packet sequence number, or UINT64_MAX if not present in the index. */ - uint64_t packet_seq_num = 0; + uint64_t packet_seq_num = UINT64_MAX; }; struct ctf_fs_ds_index