Fix: posix_fallocate() returns int > 0 on errors
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 13 Oct 2015 16:13:11 +0000 (12:13 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Fri, 16 Oct 2015 18:45:04 +0000 (14:45 -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 29fa5984a110b8421287308bb1c3a4998fe1a4ce..a32e0cc03d819f5886ef49ffe171ac95f15a5587 100644 (file)
@@ -908,7 +908,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.025458 seconds and 4 git commands to generate.