X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Ffs-src%2Fdata-stream-file.c;h=30da41a140fca4ee278dc5cfdd63f7d6f1c8b675;hb=30174f59ca102e1a3cff21521c901523597483ad;hp=9d9726fdc62840f7c5bd091c18d461b34e9f0bff;hpb=701a09030b59bfa464c03252e0c9acbcfac1fc94;p=babeltrace.git diff --git a/src/plugins/ctf/fs-src/data-stream-file.c b/src/plugins/ctf/fs-src/data-stream-file.c index 9d9726fd..30da41a1 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.c +++ b/src/plugins/ctf/fs-src/data-stream-file.c @@ -221,12 +221,8 @@ enum ctf_msg_iter_medium_status medop_seek(off_t offset, void *data) bt_self_component *self_comp = ds_file->self_comp; bt_logging_level log_level = ds_file->log_level; - if (offset < 0 || offset > file_size) { - BT_COMP_LOGE("Invalid medium seek request: offset=%jd, file-size=%jd", - (intmax_t) offset, (intmax_t) file_size); - status = CTF_MSG_ITER_MEDIUM_STATUS_INVAL; - goto end; - } + BT_ASSERT(offset >= 0); + BT_ASSERT(offset < file_size); /* If there is no current mapping, map the right file directly. */ if (!ds_file->mmap_addr) {