Cleanup: move type_id initialization after byte order check
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Mar 2015 23:26:41 +0000 (18:26 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 16 Mar 2015 19:01:45 +0000 (15:01 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ir/event-types.c

index 8bfc1f6153dba67b08c5746701e940c36487eb36..a4dca127eb0c7c0b39280f3e2984cb4dd3928e52 100644 (file)
@@ -1763,7 +1763,6 @@ int bt_ctf_field_type_set_byte_order(struct bt_ctf_field_type *type,
                goto end;
        }
 
-       type_id = type->declaration->id;
        switch (byte_order) {
        case BT_CTF_BYTE_ORDER_NATIVE:
                /* Leave unset. Will be initialized by parent. */
@@ -1781,6 +1780,7 @@ int bt_ctf_field_type_set_byte_order(struct bt_ctf_field_type *type,
                goto end;
        }
 
+       type_id = type->declaration->id;
        if (set_byte_order_funcs[type_id]) {
                set_byte_order_funcs[type_id](type, internal_byte_order, 0);
        }
This page took 0.025463 seconds and 4 git commands to generate.