X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;fp=formats%2Fctf%2Fctf.c;h=ef85f4bda757803540ba524e6dd177bdac9fd0d2;hp=a2ef43e242a28df7584e6d0180a56f7d6ce633aa;hb=c2e0c69bf42beb8cbe80c5dc64a4be25b62303e1;hpb=480ef0579251dd34372d0b25d23d1af2ac7e3bdb diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index a2ef43e2..ef85f4bd 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -1510,6 +1510,7 @@ int create_stream_one_packet_index(struct ctf_stream_pos *pos, int ret; begin: + memset(&packet_index, 0, sizeof(packet_index)); if (!pos->mmap_offset) { first_packet = 1; } @@ -1541,16 +1542,6 @@ begin: pos->offset = 0; /* Position of the packet header */ packet_index.offset = pos->mmap_offset; - packet_index.content_size = 0; - packet_index.packet_size = 0; - packet_index.ts_real.timestamp_begin = 0; - packet_index.ts_real.timestamp_end = 0; - packet_index.ts_cycles.timestamp_begin = 0; - packet_index.ts_cycles.timestamp_end = 0; - packet_index.events_discarded = 0; - packet_index.events_discarded_len = 0; - packet_index.stream_instance_id = 0; - packet_index.packet_seq_num = 0; /* read and check header, set stream id (and check) */ if (file_stream->parent.trace_packet_header) {