Given the lifecycle of a component, I'm pretty sure this condition can
never be true. For dummy_consume() to be called,
dummy_graph_is_configured() must execute successfully. If
dummy_graph_is_configured() executes successfully, `dummy->msg_iter` is
necessarily set.
Change-Id: I5c11c6b76c8cb267f0185c1a35bc2f5e70826509
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12009
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
bt_component_class_sink_consume_method_status dummy_consume(
bt_self_component_sink *component)
{
- bt_component_class_sink_consume_method_status status;
bt_message_array_const msgs;
uint64_t count;
struct dummy *dummy;
dummy = bt_self_component_get_data(self_comp);
BT_ASSERT_DBG(dummy);
-
- if (G_UNLIKELY(!dummy->msg_iter)) {
- status = BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_END;
- goto end;
- }
+ BT_ASSERT_DBG(dummy->msg_iter);
/* Consume one message */
next_status = bt_message_iterator_next(
break;
}
- status = (int) next_status;
-
-end:
- return status;
+ return (int) next_status;
}