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 <[email protected]>
---
 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 0753621..518ec61 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 60749a6..68ccf7a 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);
        }
-- 
1.7.7.3


_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to