src.ctf.fs: initialize ctf_fs_ds_index_entry::packet_seq_num to UINT64_MAX in class
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 13 Jun 2022 16:47:53 +0000 (12:47 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 17 Apr 2024 17:57:53 +0000 (13:57 -0400)
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 <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8346
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12341
Tested-by: jenkins <jenkins@lttng.org>
src/plugins/ctf/fs-src/data-stream-file.cpp
src/plugins/ctf/fs-src/data-stream-file.hpp

index aa36c7c6b95070599d8268b5a761d8365bc56d72..3eb3604e437e49ba4eff35e1381ef57e66f1ad99 100644 (file)
@@ -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<ctf_fs_ds_index_entry>(offset, packetSize);
 
-    entry->packet_seq_num = UINT64_MAX;
-
     return entry;
 }
 
index e5418ced7d5897ec2be66dec06a73838dcc4c40f..10c97a5ebe396bbe68e06b919866768407599b99 100644 (file)
@@ -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
This page took 0.025743 seconds and 4 git commands to generate.