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>
Tue, 23 Aug 2022 16:06:16 +0000 (12:06 -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>
src/plugins/ctf/fs-src/data-stream-file.cpp
src/plugins/ctf/fs-src/data-stream-file.hpp

index cf7a687210910ae8a3044677fe3478414bc9c32b..5da9b9d04be2927cf8ba9cc40fd02ca0fd8611ee 100644 (file)
@@ -399,8 +399,6 @@ static ctf_fs_ds_index_entry::UP ctf_fs_ds_index_entry_create(const bt2_common::
     ctf_fs_ds_index_entry::UP entry =
         bt2_common::makeUnique<ctf_fs_ds_index_entry>(offset, packetSize);
 
-    entry->packet_seq_num = UINT64_MAX;
-
     return entry;
 }
 
index a9b18ac108574e9aec0310160a80a5660e1120df..28ffe8160277c7c346bc4fa5d7096e4074a02c26 100644 (file)
@@ -114,7 +114,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.025619 seconds and 5 git commands to generate.