Always evaluate BT_ASSERT(); add BT_ASSERT_DBG() for debug mode only
[babeltrace.git] / src / lib / trace-ir / trace.c
index 72493a48589441a641955a7d2da9d0011f86ba1e..1536feaf6c3b4e77e720703acc188d042651c21e 100644 (file)
@@ -25,6 +25,7 @@
 #include "lib/logging.h"
 
 #include "lib/assert-pre.h"
+#include "lib/assert-post.h"
 #include <babeltrace2/trace-ir/trace.h>
 #include <babeltrace2/trace-ir/trace-const.h>
 #include <babeltrace2/trace-ir/event-class.h>
@@ -108,7 +109,7 @@ void destroy_trace(struct bt_object *obj)
                         * The destruction listener should not have kept a
                         * reference to the trace.
                         */
-                       BT_ASSERT_PRE(trace->base.ref_count == 1, "Destruction listener kept a reference to the trace being destroyed: %![trace-]+t", trace);
+                       BT_ASSERT_POST(trace->base.ref_count == 1, "Destruction listener kept a reference to the trace being destroyed: %![trace-]+t", trace);
                }
                g_array_free(trace->destruction_listeners, TRUE);
                trace->destruction_listeners = NULL;
@@ -241,7 +242,6 @@ void bt_trace_set_uuid(struct bt_trace *trace, bt_uuid uuid)
        BT_LIB_LOGD("Set trace's UUID: %!+t", trace);
 }
 
-BT_ASSERT_FUNC
 static
 bool trace_has_environment_entry(const struct bt_trace *trace, const char *name)
 {
This page took 0.023738 seconds and 4 git commands to generate.