X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Ftrace-ir%2Fpacket-context-field.c;h=e8c577e8964f7a261c9769fecf2306fddd96d1f6;hb=40f4ba76dd6f9508ca51b6220eaed57632281a07;hp=b3827435d7165d43038be29ab8477a302f233329;hpb=56e18c4ce186892c36d7f2cb5078087425e60134;p=babeltrace.git diff --git a/lib/trace-ir/packet-context-field.c b/lib/trace-ir/packet-context-field.c index b3827435..e8c577e8 100644 --- a/lib/trace-ir/packet-context-field.c +++ b/lib/trace-ir/packet-context-field.c @@ -24,8 +24,8 @@ #include #include -#include #include +#include #include #include #include @@ -36,10 +36,11 @@ struct bt_field *bt_packet_context_field_borrow_field( struct bt_field_wrapper *field_wrapper = (void *) context_field; BT_ASSERT_PRE_NON_NULL(field_wrapper, "Packet context field"); - return field_wrapper->field; + return (void *) field_wrapper->field; } -void bt_packet_context_field_release(struct bt_packet_context_field *context_field) +void bt_packet_context_field_release( + struct bt_packet_context_field *context_field) { struct bt_field_wrapper *field_wrapper = (void *) context_field; @@ -56,19 +57,20 @@ void bt_packet_context_field_release(struct bt_packet_context_field *context_fie } struct bt_packet_context_field *bt_packet_context_field_create( - struct bt_stream_class *stream_class) + struct bt_stream_class *priv_stream_class) { + struct bt_stream_class *stream_class = (void *) priv_stream_class; struct bt_field_wrapper *field_wrapper; BT_ASSERT_PRE_NON_NULL(stream_class, "Stream class"); BT_ASSERT_PRE(stream_class->frozen, "Stream class is not part of a trace: %!+S", stream_class); - BT_ASSERT_PRE(stream_class->packet_context_ft, - "Stream class has no packet context field type: %!+S", + BT_ASSERT_PRE(stream_class->packet_context_fc, + "Stream class has no packet context field classe: %!+S", stream_class); field_wrapper = bt_field_wrapper_create( &stream_class->packet_context_field_pool, - (void *) stream_class->packet_context_ft); + (void *) stream_class->packet_context_fc); if (!field_wrapper) { BT_LIB_LOGE("Cannot allocate one packet context field from stream class: " "%![sc-]+S", stream_class);