Fix: read/write mode check
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 28 Nov 2013 00:00:49 +0000 (19:00 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 21 Feb 2014 17:12:11 +0000 (12:12 -0500)
It's on the "prot" field, not flags. Moreover, it needs to be done with
a == / != comparison, not a mask.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/babeltrace/ctf/types.h

index c25b904bd4563ee8015c8dd2e1898847f53d05ce..4b879634cbe090353b8e09a31e367ce70e93b258 100644 (file)
@@ -140,7 +140,7 @@ int ctf_move_pos(struct ctf_stream_pos *pos, uint64_t bit_offset)
        printf_debug("ctf_move_pos test EOF: %" PRId64 "\n", pos->offset);
        if (unlikely(pos->offset == EOF))
                return 0;
-       if (pos->flags & PROT_READ)
+       if (pos->prot == PROT_READ)
                max_len = pos->content_size;
        else
                max_len = pos->packet_size;
@@ -207,7 +207,7 @@ int ctf_pos_access_ok(struct ctf_stream_pos *pos, uint64_t bit_len)
 
        if (unlikely(pos->offset == EOF))
                return 0;
-       if (pos->flags & PROT_READ)
+       if (pos->prot == PROT_READ)
                max_len = pos->content_size;
        else
                max_len = pos->packet_size;
This page took 0.024525 seconds and 4 git commands to generate.