Fix: posix_fallocate() returns int > 0 on errors
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 13 Oct 2015 16:13:11 +0000 (12:13 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 13 Oct 2015 20:17:02 +0000 (16:17 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ctf.c

index 74fcb5bc60fe316cf45e6926ae047a15aedd0ddf..19f61b580ef6318b555fc3885defafc3be337bc5 100644 (file)
@@ -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:
This page took 0.025148 seconds and 4 git commands to generate.