X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fctf-writer%2Ffield-wrapper.c;h=6b1625db060798e679a8b3b3f99c731dd33a8813;hb=98b15851a941e7342b8bb19e265cdc3a40fabfb8;hp=2124d4ccbfad6ec6e214443414be2060a74fa75b;hpb=cb169d056ee13fe68308b5f0ee4e9f58310b781b;p=babeltrace.git diff --git a/src/ctf-writer/field-wrapper.c b/src/ctf-writer/field-wrapper.c index 2124d4cc..6b1625db 100644 --- a/src/ctf-writer/field-wrapper.c +++ b/src/ctf-writer/field-wrapper.c @@ -54,7 +54,7 @@ BT_HIDDEN void bt_ctf_field_wrapper_destroy(struct bt_ctf_field_wrapper *field_wrapper) { BT_LOGD("Destroying field wrapper: addr=%p", field_wrapper); - BT_ASSERT(!field_wrapper->field); + BT_ASSERT_DBG(!field_wrapper->field); BT_LOGD_STR("Putting stream class."); g_free(field_wrapper); } @@ -65,22 +65,15 @@ struct bt_ctf_field_wrapper *bt_ctf_field_wrapper_create( { struct bt_ctf_field_wrapper *field_wrapper = NULL; - BT_ASSERT(pool); - BT_ASSERT(ft); + BT_ASSERT_DBG(pool); + BT_ASSERT_DBG(ft); field_wrapper = bt_ctf_object_pool_create_object(pool); if (!field_wrapper) { BT_LOGE("Cannot allocate one field wrapper"); - goto error; + goto end; } - BT_ASSERT(field_wrapper->field); - goto end; - -error: - if (field_wrapper) { - bt_ctf_field_wrapper_destroy(field_wrapper); - field_wrapper = NULL; - } + BT_ASSERT_DBG(field_wrapper->field); end: return field_wrapper;