#define BT_LOG_TAG "LIB/PACKET"
#include "lib/logging.h"
-#include "lib/assert-pre.h"
+#include "lib/assert-cond.h"
#include <babeltrace2/trace-ir/packet.h>
#include <babeltrace2/trace-ir/trace.h>
#include <babeltrace2/trace-ir/stream-class.h>
struct bt_stream *bt_packet_borrow_stream(struct bt_packet *packet)
{
- BT_ASSERT_PRE_DEV_NON_NULL(packet, "Packet");
+ BT_ASSERT_PRE_DEV_PACKET_NON_NULL(packet);
return packet->stream;
}
struct bt_field *bt_packet_borrow_context_field(struct bt_packet *packet)
{
- BT_ASSERT_PRE_DEV_NON_NULL(packet, "Packet");
+ BT_ASSERT_PRE_DEV_PACKET_NON_NULL(packet);
return packet->context_field ? packet->context_field->field : NULL;
}
struct bt_stream *stream = (void *) c_stream;
BT_ASSERT_PRE_NO_ERROR();
- BT_ASSERT_PRE_NON_NULL(stream, "Stream");
+ BT_ASSERT_PRE_STREAM_NON_NULL(stream);
BT_ASSERT_PRE(stream->class->supports_packets,
"Stream class does not support packets: %![sc-]+S",
stream->class);