X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Ftext%2Fdetails%2Fdetails.c;h=95aabe1f7ef74b04f1990e0413d8877ec077cb5f;hb=708e8c9dea489b8c6113adc3ea03d16c993b1f0c;hp=4f304f7320f05554c83d7728dceb4613e2d19f36;hpb=33f24144e8e35a09395866c2f02dc085d125f355;p=babeltrace.git diff --git a/src/plugins/text/details/details.c b/src/plugins/text/details/details.c index 4f304f73..95aabe1f 100644 --- a/src/plugins/text/details/details.c +++ b/src/plugins/text/details/details.c @@ -373,18 +373,9 @@ bt_component_class_initialize_method_status details_init( add_port_status = bt_self_component_sink_add_input_port(comp, IN_PORT_NAME, NULL, NULL); - switch (add_port_status) { - case BT_SELF_COMPONENT_ADD_PORT_STATUS_OK: - status = BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_OK; - break; - case BT_SELF_COMPONENT_ADD_PORT_STATUS_ERROR: - status = BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_ERROR; - break; - case BT_SELF_COMPONENT_ADD_PORT_STATUS_MEMORY_ERROR: - status = BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_MEMORY_ERROR; - break; - default: - bt_common_abort(); + if (add_port_status != BT_SELF_COMPONENT_ADD_PORT_STATUS_OK) { + status = (int) add_port_status; + goto error; } details_comp = create_details_comp(comp);