Always evaluate BT_ASSERT(); add BT_ASSERT_DBG() for debug mode only
[babeltrace.git] / src / lib / trace-ir / event.c
index 15b40c8c3fb27d4e1ea4a52fc8c6589dfc8c2895..9bf115c943376e72b677177b75000ef14e3e1771 100644 (file)
@@ -49,7 +49,7 @@
 BT_HIDDEN
 void _bt_event_set_is_frozen(const struct bt_event *event, bool is_frozen)
 {
-       BT_ASSERT(event);
+       BT_ASSERT_DBG(event);
        BT_LIB_LOGD("Setting event's frozen state: %!+e, is-frozen=%d",
                event, is_frozen);
 
@@ -137,7 +137,7 @@ end:
 
 struct bt_event_class *bt_event_borrow_class(struct bt_event *event)
 {
-       BT_ASSERT_PRE_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
        return event->class;
 }
 
@@ -149,7 +149,7 @@ const struct bt_event_class *bt_event_borrow_class_const(
 
 struct bt_stream *bt_event_borrow_stream(struct bt_event *event)
 {
-       BT_ASSERT_PRE_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
        return event->stream;
 }
 
@@ -161,40 +161,40 @@ const struct bt_stream *bt_event_borrow_stream_const(
 
 struct bt_field *bt_event_borrow_common_context_field(struct bt_event *event)
 {
-       BT_ASSERT_PRE_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
        return event->common_context_field;
 }
 
 const struct bt_field *bt_event_borrow_common_context_field_const(
                const struct bt_event *event)
 {
-       BT_ASSERT_PRE_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
        return event->common_context_field;
 }
 
 struct bt_field *bt_event_borrow_specific_context_field(struct bt_event *event)
 {
-       BT_ASSERT_PRE_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
        return event->specific_context_field;
 }
 
 const struct bt_field *bt_event_borrow_specific_context_field_const(
                const struct bt_event *event)
 {
-       BT_ASSERT_PRE_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
        return event->specific_context_field;
 }
 
 struct bt_field *bt_event_borrow_payload_field(struct bt_event *event)
 {
-       BT_ASSERT_PRE_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
        return event->payload_field;
 }
 
 const struct bt_field *bt_event_borrow_payload_field_const(
                const struct bt_event *event)
 {
-       BT_ASSERT_PRE_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
        return event->payload_field;
 }
 
@@ -233,7 +233,7 @@ void bt_event_destroy(struct bt_event *event)
 
 struct bt_packet *bt_event_borrow_packet(struct bt_event *event)
 {
-       BT_ASSERT_PRE_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
        return event->packet;
 }
 
This page took 0.024368 seconds and 4 git commands to generate.