}
end:
- if (status) {
+ if (status < 0) {
BT_LOGW("Cannot read bit array: two different byte orders not at a byte boundary: "
"btr-addr=%p, last-bo=%s, next-bo=%s",
btr, bt_ctf_byte_order_string(btr->last_bo),
while (true) {
*status = handle_state(btr);
- if (*status != BT_CTF_BTR_STATUS_OK) {
- break;
- } else if (btr->state == BTR_STATE_DONE) {
+ if (*status != BT_CTF_BTR_STATUS_OK ||
+ btr->state == BTR_STATE_DONE) {
break;
}
}
while (true) {
*status = handle_state(btr);
- if (*status != BT_CTF_BTR_STATUS_OK) {
- break;
- } else if (btr->state == BTR_STATE_DONE) {
+ if (*status != BT_CTF_BTR_STATUS_OK ||
+ btr->state == BTR_STATE_DONE) {
break;
}
}