X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Fcommon%2Fbfcr%2Fbfcr.c;h=89e83ca479eeb03f71e6a0ede2a5226bbd8b3251;hb=e2bd7d40c86a2209c18c594b391b2d4c7ea59740;hp=fc9b6699797f3e9719b8c4cfd64ceaa85d74d7c3;hpb=ff89ed28f8f411258190b9c1972a58af3d5c850e;p=babeltrace.git diff --git a/src/plugins/ctf/common/bfcr/bfcr.c b/src/plugins/ctf/common/bfcr/bfcr.c index fc9b6699..89e83ca4 100644 --- a/src/plugins/ctf/common/bfcr/bfcr.c +++ b/src/plugins/ctf/common/bfcr/bfcr.c @@ -116,8 +116,8 @@ struct bt_bfcr { * classes for which the common boundary is not the boundary of * a byte cannot have different byte orders. * - * This is set to -1 on reset and when the last basic field class - * was a string class. + * This is set to CTF_BYTE_ORDER_UNKNOWN on reset and when the last + * basic field class was a string class. */ enum ctf_byte_order last_bo; @@ -517,12 +517,12 @@ enum bt_bfcr_status validate_contiguous_bo(struct bt_bfcr *bfcr, } /* Always valid if last byte order is unknown */ - if (bfcr->last_bo == -1) { + if (bfcr->last_bo == CTF_BYTE_ORDER_UNKNOWN) { goto end; } /* Always valid if next byte order is unknown */ - if (next_bo == -1) { + if (next_bo == CTF_BYTE_ORDER_UNKNOWN) { goto end; } @@ -1241,7 +1241,7 @@ void reset(struct bt_bfcr *bfcr) stack_clear(bfcr->stack); stitch_reset(bfcr); bfcr->buf.addr = NULL; - bfcr->last_bo = -1; + bfcr->last_bo = CTF_BYTE_ORDER_UNKNOWN; } static