Always evaluate BT_ASSERT(); add BT_ASSERT_DBG() for debug mode only
[babeltrace.git] / src / lib / graph / component-filter.c
index 5efff1ab75bb9ae3ca1babb38f1eaea99e464876..010e8fe85f5b2007ada57d7a57ee1d646ec1b39a 100644 (file)
@@ -50,7 +50,8 @@ struct bt_component *bt_component_filter_create(
 
        filter = g_new0(struct bt_component_filter, 1);
        if (!filter) {
-               BT_LOGE_STR("Failed to allocate one filter component.");
+               BT_LIB_LOGE_APPEND_CAUSE(
+                       "Failed to allocate one filter component.");
                goto end;
        }
 
@@ -64,12 +65,12 @@ bt_component_filter_borrow_class_const(
 {
        struct bt_component_class *cls;
 
-       BT_ASSERT_PRE_NON_NULL(component, "Component");
+       BT_ASSERT_PRE_DEV_NON_NULL(component, "Component");
 
        cls = component->parent.class;
 
-       BT_ASSERT(cls);
-       BT_ASSERT(cls->type == BT_COMPONENT_CLASS_TYPE_FILTER);
+       BT_ASSERT_DBG(cls);
+       BT_ASSERT_DBG(cls->type == BT_COMPONENT_CLASS_TYPE_FILTER);
 
        return (bt_component_class_filter *) cls;
 }
This page took 0.025156 seconds and 4 git commands to generate.