From 3fa759e9c931b5dd3766f38c3c5bbfc26b1d590a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 5 Mar 2015 18:26:41 -0500 Subject: [PATCH] Cleanup: move type_id initialization after byte order check MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- formats/ctf/ir/event-types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formats/ctf/ir/event-types.c b/formats/ctf/ir/event-types.c index 8bfc1f615..a4dca127e 100644 --- a/formats/ctf/ir/event-types.c +++ b/formats/ctf/ir/event-types.c @@ -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); } -- 2.34.1