This is to follow the coding style of the rest of the file and most of
the project.
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Ibdc1adcc8eef7d95df2c69113bc20228c4d00b9b
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2247
Tested-by: jenkins <jenkins@lttng.org>
struct bt_msg_iter *notit)
{
struct ctf_field_class *packet_header_fc = NULL;
struct bt_msg_iter *notit)
{
struct ctf_field_class *packet_header_fc = NULL;
- enum bt_msg_iter_status ret = BT_MSG_ITER_STATUS_OK;
+ enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
/*
* Make sure at least one bit is available for this packet. An
* empty packet is impossible. If we reach the end of the medium
* at this point, then it's considered the end of the stream.
*/
/*
* Make sure at least one bit is available for this packet. An
* empty packet is impossible. If we reach the end of the medium
* at this point, then it's considered the end of the stream.
*/
- ret = buf_ensure_available_bits(notit);
- switch (ret) {
+ status = buf_ensure_available_bits(notit);
+ switch (status) {
case BT_MSG_ITER_STATUS_OK:
break;
case BT_MSG_ITER_STATUS_EOF:
case BT_MSG_ITER_STATUS_OK:
break;
case BT_MSG_ITER_STATUS_EOF:
- ret = BT_MSG_ITER_STATUS_OK;
+ status = BT_MSG_ITER_STATUS_OK;
notit->state = STATE_CHECK_EMIT_MSG_STREAM_END;
goto end;
default:
notit->state = STATE_CHECK_EMIT_MSG_STREAM_END;
goto end;
default:
BT_COMP_LOGD("Decoding packet header field:"
"notit-addr=%p, trace-class-addr=%p, fc-addr=%p",
notit, notit->meta.tc, packet_header_fc);
BT_COMP_LOGD("Decoding packet header field:"
"notit-addr=%p, trace-class-addr=%p, fc-addr=%p",
notit, notit->meta.tc, packet_header_fc);
- ret = read_dscope_begin_state(notit, packet_header_fc,
+ status = read_dscope_begin_state(notit, packet_header_fc,
STATE_AFTER_TRACE_PACKET_HEADER,
STATE_DSCOPE_TRACE_PACKET_HEADER_CONTINUE, NULL);
STATE_AFTER_TRACE_PACKET_HEADER,
STATE_DSCOPE_TRACE_PACKET_HEADER_CONTINUE, NULL);
BT_COMP_LOGW("Cannot decode packet header field: "
"notit-addr=%p, trace-class-addr=%p, "
"fc-addr=%p",
BT_COMP_LOGW("Cannot decode packet header field: "
"notit-addr=%p, trace-class-addr=%p, "
"fc-addr=%p",
enum bt_msg_iter_status bt_msg_iter_seek(struct bt_msg_iter *notit,
off_t offset)
{
enum bt_msg_iter_status bt_msg_iter_seek(struct bt_msg_iter *notit,
off_t offset)
{
- enum bt_msg_iter_status ret = BT_MSG_ITER_STATUS_OK;
+ enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
enum bt_msg_iter_medium_status medium_status;
BT_ASSERT(notit);
if (offset < 0) {
BT_COMP_LOGE("Cannot seek to negative offset: offset=%jd", (intmax_t) offset);
enum bt_msg_iter_medium_status medium_status;
BT_ASSERT(notit);
if (offset < 0) {
BT_COMP_LOGE("Cannot seek to negative offset: offset=%jd", (intmax_t) offset);
- ret = BT_MSG_ITER_STATUS_INVAL;
+ status = BT_MSG_ITER_STATUS_INVAL;
goto end;
}
if (!notit->medium.medops.seek) {
goto end;
}
if (!notit->medium.medops.seek) {
- ret = BT_MSG_ITER_STATUS_UNSUPPORTED;
+ status = BT_MSG_ITER_STATUS_UNSUPPORTED;
BT_COMP_LOGD("Aborting seek as the iterator's underlying media does not implement seek support.");
goto end;
}
BT_COMP_LOGD("Aborting seek as the iterator's underlying media does not implement seek support.");
goto end;
}
BT_MSG_ITER_SEEK_WHENCE_SET, offset, notit->medium.data);
if (medium_status != BT_MSG_ITER_MEDIUM_STATUS_OK) {
if (medium_status == BT_MSG_ITER_MEDIUM_STATUS_EOF) {
BT_MSG_ITER_SEEK_WHENCE_SET, offset, notit->medium.data);
if (medium_status != BT_MSG_ITER_MEDIUM_STATUS_OK) {
if (medium_status == BT_MSG_ITER_MEDIUM_STATUS_EOF) {
- ret = BT_MSG_ITER_STATUS_EOF;
+ status = BT_MSG_ITER_STATUS_EOF;
- ret = BT_MSG_ITER_STATUS_ERROR;
+ status = BT_MSG_ITER_STATUS_ERROR;
notit->cur_packet_offset = offset;
end:
notit->cur_packet_offset = offset;
end: