X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=60d9c9f9459d159b7627c9e76927409eccd55272;hp=947b439d24349d9055459e3339eec03fc27a2f35;hb=e0a5b455a6cf824c343fe094a1f75f2565eabb5f;hpb=9a7312d380ce32824cb0856ef1333f9fa3b9f77f diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 947b439d..60d9c9f9 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -712,7 +712,7 @@ void ctf_packet_seek(struct bt_stream_pos *stream_pos, size_t index, int whence) switch (whence) { case SEEK_CUR: /* The writer will add padding */ - pos->mmap_offset += WRITE_PACKET_LEN / CHAR_BIT; + pos->mmap_offset += pos->packet_size / CHAR_BIT; break; case SEEK_SET: assert(index == 0); /* only seek supported for now */