From 31e670293588d7882a232bc14b93d5e956fa43f4 Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Tue, 13 Dec 2011 07:47:09 -0500 Subject: [PATCH] Use the generic call to move_pos_slow Replace two hardcoded calls to ctf_move_pos_slow by calls to the function pointer registered when opening a trace. Signed-off-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- converter/babeltrace-lib.c | 2 +- include/babeltrace/ctf/types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/converter/babeltrace-lib.c b/converter/babeltrace-lib.c index 07536217..518ec612 100644 --- a/converter/babeltrace-lib.c +++ b/converter/babeltrace-lib.c @@ -279,7 +279,7 @@ static int babeltrace_filestream_seek(struct ctf_file_stream *file_stream, */ break; case BT_SEEK_BEGIN: - ctf_move_pos_slow(&file_stream->pos, 0, SEEK_SET); + file_stream->pos.move_pos_slow(&file_stream->pos, 0, SEEK_SET); ret = stream_read_event(file_stream); break; case BT_SEEK_TIME: diff --git a/include/babeltrace/ctf/types.h b/include/babeltrace/ctf/types.h index 60749a6c..68ccf7af 100644 --- a/include/babeltrace/ctf/types.h +++ b/include/babeltrace/ctf/types.h @@ -192,7 +192,7 @@ void ctf_pos_get_event(struct ctf_stream_pos *pos) if (pos->offset == pos->content_size) { printf_debug("ctf_move_pos_slow (before call): %zd\n", pos->offset); - ctf_move_pos_slow(pos, 0, SEEK_CUR); + pos->move_pos_slow(pos, 0, SEEK_CUR); printf_debug("ctf_move_pos_slow (after call): %zd\n", pos->offset); } -- 2.34.1