Replace libuuid with internal implementation
[babeltrace.git] / src / lib / trace-ir / clock-class.c
index fdeef9289af4ddf85f9b329f7ee64efaa2fff822..119b4db929e887a3877c5b54f0489b0b6d32311f 100644 (file)
@@ -25,7 +25,7 @@
 #include "lib/logging.h"
 
 #include "lib/assert-pre.h"
-#include "compat/uuid.h"
+#include "common/uuid.h"
 #include <babeltrace2/trace-ir/clock-class-const.h>
 #include <babeltrace2/trace-ir/clock-class.h>
 #include "clock-class.h"
@@ -90,20 +90,20 @@ struct bt_clock_class *bt_clock_class_create(bt_self_component *self_comp)
 
        clock_class = g_new0(struct bt_clock_class, 1);
        if (!clock_class) {
-               BT_LOGE_STR("Failed to allocate one clock class.");
+               BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate one clock class.");
                goto error;
        }
 
        bt_object_init_shared(&clock_class->base, destroy_clock_class);
        clock_class->name.str = g_string_new(NULL);
        if (!clock_class->name.str) {
-               BT_LOGE_STR("Failed to allocate a GString.");
+               BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
                goto error;
        }
 
        clock_class->description.str = g_string_new(NULL);
        if (!clock_class->description.str) {
-               BT_LOGE_STR("Failed to allocate a GString.");
+               BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString.");
                goto error;
        }
 
@@ -116,7 +116,8 @@ struct bt_clock_class *bt_clock_class_create(bt_self_component *self_comp)
                        free_clock_snapshot,
                clock_class);
        if (ret) {
-               BT_LOGE("Failed to initialize clock snapshot pool: ret=%d",
+               BT_LIB_LOGE_APPEND_CAUSE(
+                       "Failed to initialize clock snapshot pool: ret=%d",
                        ret);
                goto error;
        }
@@ -261,7 +262,7 @@ void bt_clock_class_set_uuid(struct bt_clock_class *clock_class,
        BT_ASSERT_PRE_NON_NULL(clock_class, "Clock class");
        BT_ASSERT_PRE_NON_NULL(uuid, "UUID");
        BT_ASSERT_PRE_CLOCK_CLASS_HOT(clock_class);
-       memcpy(clock_class->uuid.uuid, uuid, BABELTRACE_UUID_LEN);
+       bt_uuid_copy(clock_class->uuid.uuid, uuid);
        clock_class->uuid.value = clock_class->uuid.uuid;
        BT_LIB_LOGD("Set clock class's UUID: %!+K", clock_class);
 }
This page took 0.024533 seconds and 4 git commands to generate.