lib: use common precond. assert. macros from `assert-cond.h` thru lib
[babeltrace.git] / src / lib / trace-ir / event.c
index cb6b6adacdae2175e0594d9b32de714fdf54c53d..fe2c5805cb7ead5d39ce3dced85b12d81220ea8f 100644 (file)
@@ -8,7 +8,7 @@
 #define BT_LOG_TAG "LIB/EVENT"
 #include "lib/logging.h"
 
-#include "lib/assert-pre.h"
+#include "lib/assert-cond.h"
 #include <babeltrace2/trace-ir/event.h>
 #include <babeltrace2/trace-ir/event-class.h>
 #include <babeltrace2/trace-ir/stream-class.h>
@@ -121,7 +121,7 @@ end:
 
 struct bt_event_class *bt_event_borrow_class(struct bt_event *event)
 {
-       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
        return event->class;
 }
 
@@ -133,7 +133,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_DEV_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
        return event->stream;
 }
 
@@ -145,40 +145,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_DEV_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_EVENT_NON_NULL(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_DEV_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
        return event->common_context_field;
 }
 
 struct bt_field *bt_event_borrow_specific_context_field(struct bt_event *event)
 {
-       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_EVENT_NON_NULL(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_DEV_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
        return event->specific_context_field;
 }
 
 struct bt_field *bt_event_borrow_payload_field(struct bt_event *event)
 {
-       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
        return event->payload_field;
 }
 
 const struct bt_field *bt_event_borrow_payload_field_const(
                const struct bt_event *event)
 {
-       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
        return event->payload_field;
 }
 
@@ -217,7 +217,7 @@ void bt_event_destroy(struct bt_event *event)
 
 struct bt_packet *bt_event_borrow_packet(struct bt_event *event)
 {
-       BT_ASSERT_PRE_DEV_NON_NULL(event, "Event");
+       BT_ASSERT_PRE_DEV_EVENT_NON_NULL(event);
        return event->packet;
 }
 
This page took 0.025858 seconds and 4 git commands to generate.