lib: add post condition assertions for current thread error after user functions
[babeltrace.git] / src / lib / graph / message / message-iterator-inactivity.c
index cfec17edc7f19995286661a50036e2b7ef1ce18b..adfa4c574ea4675886f8fe43e1f0f9f279ea05c9 100644 (file)
@@ -20,8 +20,8 @@
  * SOFTWARE.
  */
 
-#define BT_LOG_TAG "MSG-MESSAGE-ITERATOR-INACTIVITY"
-#include "lib/lib-logging.h"
+#define BT_LOG_TAG "LIB/MSG-MSG-ITER-INACTIVITY"
+#include "lib/logging.h"
 
 #include "lib/assert-pre.h"
 #include "lib/object.h"
@@ -41,7 +41,7 @@ void bt_message_message_iterator_inactivity_destroy(struct bt_object *obj)
                        (struct bt_message_message_iterator_inactivity *) obj;
 
        BT_LIB_LOGD("Destroying message iterator inactivity message: %!+n",
-                       message);
+               message);
 
        if (message->default_cs) {
                bt_clock_snapshot_recycle(message->default_cs);
@@ -68,8 +68,9 @@ struct bt_message *bt_message_message_iterator_inactivity_create(
                default_clock_class, value_cycles);
        message = g_new0(struct bt_message_message_iterator_inactivity, 1);
        if (!message) {
-               BT_LOGE_STR("Failed to allocate one message iterator "
-                               "inactivity message.");
+               BT_LIB_LOGE_APPEND_CAUSE(
+                       "Failed to allocate one message iterator "
+                       "inactivity message.");
                goto error;
        }
        bt_message_init(&message->parent,
@@ -84,7 +85,7 @@ struct bt_message *bt_message_message_iterator_inactivity_create(
        bt_clock_snapshot_set_raw_value(message->default_cs, value_cycles);
 
        BT_LIB_LOGD("Created message iterator inactivity message object: %!+n",
-                       ret_msg);
+               ret_msg);
        goto end;
 
 error:
@@ -100,7 +101,8 @@ bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(
 {
        struct bt_message_message_iterator_inactivity *inactivity = (void *) msg;
 
-       BT_ASSERT_PRE_NON_NULL(msg, "Message");
-       BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY);
+       BT_ASSERT_PRE_DEV_NON_NULL(msg, "Message");
+       BT_ASSERT_PRE_DEV_MSG_IS_TYPE(msg,
+               BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY);
        return inactivity->default_cs;
 }
This page took 0.023703 seconds and 4 git commands to generate.