projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ctf: assert that msg iter and medium seek offset is valid
[babeltrace.git]
/
src
/
plugins
/
ctf
/
common
/
msg-iter
/
msg-iter.c
diff --git
a/src/plugins/ctf/common/msg-iter/msg-iter.c
b/src/plugins/ctf/common/msg-iter/msg-iter.c
index a074aafe1814ec0ba948976d04bdf8d50894371b..0a16eed412fcfe3b2269a3d1248ddd3041446cdc 100644
(file)
--- a/
src/plugins/ctf/common/msg-iter/msg-iter.c
+++ b/
src/plugins/ctf/common/msg-iter/msg-iter.c
@@
-3160,17
+3160,10
@@
enum ctf_msg_iter_status ctf_msg_iter_seek(struct ctf_msg_iter *msg_it,
off_t offset)
{
enum ctf_msg_iter_status status = CTF_MSG_ITER_STATUS_OK;
off_t offset)
{
enum ctf_msg_iter_status status = CTF_MSG_ITER_STATUS_OK;
- bt_self_component *self_comp = msg_it->self_comp;
enum ctf_msg_iter_medium_status medium_status;
BT_ASSERT(msg_it);
enum ctf_msg_iter_medium_status medium_status;
BT_ASSERT(msg_it);
- if (offset < 0) {
- BT_COMP_LOGE_APPEND_CAUSE(self_comp,
- "Cannot seek to negative offset: offset=%jd",
- (intmax_t) offset);
- status = CTF_MSG_ITER_STATUS_INVAL;
- goto end;
- }
+ BT_ASSERT(offset >= 0);
if (!msg_it->medium.medops.seek) {
status = CTF_MSG_ITER_STATUS_UNSUPPORTED;
if (!msg_it->medium.medops.seek) {
status = CTF_MSG_ITER_STATUS_UNSUPPORTED;
This page took
0.028178 seconds
and
4
git commands to generate.