Logging: standardize logging tags
[babeltrace.git] / src / lib / graph / component-class-sink-colander.c
index 667b997c3189e5423aae0b59502c470856ea0e2d..c20ff5ec7a6450984b948232493a42320ecbd344 100644 (file)
@@ -20,7 +20,7 @@
  * SOFTWARE.
  */
 
-#define BT_LOG_TAG "COLANDER"
+#define BT_LOG_TAG "LIB/COLANDER"
 #include "lib/lib-logging.h"
 
 #include "common/assert.h"
@@ -48,12 +48,7 @@ enum bt_self_component_status colander_init(
        struct bt_component_class_sink_colander_data *user_provided_data =
                init_method_data;
 
-       if (!init_method_data) {
-               BT_LOGW_STR("Component initialization method data is NULL.");
-               status = BT_SELF_COMPONENT_STATUS_ERROR;
-               goto end;
-       }
-
+       BT_ASSERT(init_method_data);
        colander_data = g_new0(
                struct bt_component_class_sink_colander_priv_data, 1);
        if (!colander_data) {
@@ -136,14 +131,7 @@ enum bt_self_component_status colander_consume(
        bt_message_array_const msgs;
 
        BT_ASSERT(colander_data);
-
-       if (!colander_data->msg_iter) {
-               BT_LIB_LOGW("Trying to consume without an "
-                       "upstream message iterator: %![comp-]+c",
-                       self_comp);
-               goto end;
-       }
-
+       BT_ASSERT(colander_data->msg_iter);
        msg_iter_status =
                bt_self_component_port_input_message_iterator_next(
                        colander_data->msg_iter, &msgs,
@@ -191,7 +179,7 @@ struct bt_component_class_sink *bt_component_class_sink_colander_get(void)
 
 end:
        bt_object_get_ref(colander_comp_cls);
-       return (void *) colander_comp_cls;
+       return colander_comp_cls;
 }
 
 __attribute__((destructor)) static
This page took 0.031144 seconds and 4 git commands to generate.