From: Francis Deslauriers Date: Fri, 5 Jul 2019 20:34:51 +0000 (-0400) Subject: src.ctf.fs: remove leftover use of pointer arithmetics X-Git-Tag: v2.0.0-rc1~555 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=6cef4a7dd155711e79ade76b18bf8b12a0c22197 src.ctf.fs: remove leftover use of pointer arithmetics This change should have been include in the commit: commit de38c26a14b60cb3b6d31cc124c187e2c1816bf5 Author: Francis Deslauriers Date: Fri Jul 5 11:19:32 2019 -0400 Fix: src.ctf.fs: pointer arithmetics on non-adjacent memory Signed-off-by: Francis Deslauriers Change-Id: If44dc7f5330f070c865b241d507082e253a92a4b Reviewed-on: https://review.lttng.org/c/babeltrace/+/1641 Tested-by: jenkins Reviewed-by: Philippe Proulx --- diff --git a/src/plugins/ctf/fs-src/data-stream-file.c b/src/plugins/ctf/fs-src/data-stream-file.c index 2c28c51d..929e96bf 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.c +++ b/src/plugins/ctf/fs-src/data-stream-file.c @@ -411,7 +411,7 @@ struct ctf_fs_ds_index *build_index_from_idx_file( if (i != 0 && index_entry->offset < prev_index_entry->offset) { BT_COMP_LOGW("Invalid, non-monotonic, packet offset encountered in LTTng trace index file: " "previous offset=%" PRIu64 ", current offset=%" PRIu64, - (index_entry - 1)->offset, index_entry->offset); + prev_index_entry->offset, index_entry->offset); goto error; }