[lttng-dev] [PATCH babeltrace] Fix: posix_fallocate() returns int > 0 on errors
Michael Jeanson
mjeanson at efficios.com
Tue Oct 13 12:15:08 EDT 2015
Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
formats/ctf/ctf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c
index 74fcb5b..19f61b5 100644
--- a/formats/ctf/ctf.c
+++ b/formats/ctf/ctf.c
@@ -906,7 +906,7 @@ void ctf_packet_seek(struct bt_stream_pos *stream_pos, size_t index, int whence)
pos->packet_size = WRITE_PACKET_LEN;
off = posix_fallocate(pos->fd, pos->mmap_offset,
pos->packet_size / CHAR_BIT);
- assert(off >= 0);
+ assert(off == 0);
pos->offset = 0;
} else {
read_next_packet:
--
1.9.1
More information about the lttng-dev
mailing list