Cleanup: ctf: msg-iter.c: rename `ret` to `status`
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 23 Oct 2019 00:52:02 +0000 (20:52 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 1 Nov 2019 14:49:33 +0000 (10:49 -0400)
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>
src/plugins/ctf/common/msg-iter/msg-iter.c

index 4ffcbe98fee63464f5a21281473ea3ed84ac53af..f941970db67c3fdbc92866c8889d4a78979efdc5 100644 (file)
@@ -765,19 +765,19 @@ enum bt_msg_iter_status read_packet_header_begin_state(
                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.
         */
-       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:
-               ret = BT_MSG_ITER_STATUS_OK;
+               status = BT_MSG_ITER_STATUS_OK;
                notit->state = STATE_CHECK_EMIT_MSG_STREAM_END;
                goto end;
        default:
@@ -797,10 +797,10 @@ enum bt_msg_iter_status read_packet_header_begin_state(
        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);
-       if (ret < 0) {
+       if (status < 0) {
                BT_COMP_LOGW("Cannot decode packet header field: "
                        "notit-addr=%p, trace-class-addr=%p, "
                        "fc-addr=%p",
@@ -808,7 +808,7 @@ enum bt_msg_iter_status read_packet_header_begin_state(
        }
 
 end:
-       return ret;
+       return status;
 }
 
 static
@@ -3084,18 +3084,18 @@ BT_HIDDEN
 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);
-               ret = BT_MSG_ITER_STATUS_INVAL;
+               status = BT_MSG_ITER_STATUS_INVAL;
                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;
        }
@@ -3104,9 +3104,9 @@ enum bt_msg_iter_status bt_msg_iter_seek(struct bt_msg_iter *notit,
                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;
                } else {
-                       ret = BT_MSG_ITER_STATUS_ERROR;
+                       status = BT_MSG_ITER_STATUS_ERROR;
                        goto end;
                }
        }
@@ -3115,7 +3115,7 @@ enum bt_msg_iter_status bt_msg_iter_seek(struct bt_msg_iter *notit,
        notit->cur_packet_offset = offset;
 
 end:
-       return ret;
+       return status;
 }
 
 static
This page took 0.027499 seconds and 4 git commands to generate.