#include <inttypes.h>
#include <errno.h>
#include "common/common.h"
-#include "compat/uuid.h"
+#include "common/uuid.h"
#include "compat/endian.h"
#include <babeltrace2/babeltrace.h>
static
int get_unary_uuid(struct ctx *ctx, struct bt_list_head *head,
- unsigned char *uuid)
+ uint8_t *uuid)
{
int i = 0;
int ret = 0;
}
src_string = node->u.unary_expression.u.string;
- ret = bt_uuid_parse(src_string, uuid);
+ ret = bt_uuid_from_str(src_string, uuid);
if (ret) {
_BT_COMP_LOGE_NODE(node,
"Cannot parse UUID: uuid=\"%s\"", src_string);
goto end;
error:
- if (left) {
- g_free(left);
- }
+ g_free(left);
end:
return ret;
ctx_pop_scope(ctx);
}
- if (event_name) {
- g_free(event_name);
- }
+ g_free(event_name);
return ret;
}
g_free(right);
_SET(set, _CLOCK_NAME_SET);
} else if (!strcmp(left, "uuid")) {
- uint8_t uuid[BABELTRACE_UUID_LEN];
+ bt_uuid_t uuid;
if (_IS_SET(set, _CLOCK_UUID_SET)) {
_BT_COMP_LOGE_DUP_ATTR(entry_node, "uuid", "clock class");
}
clock->has_uuid = true;
- memcpy(&clock->uuid[0], uuid, 16);
+ bt_uuid_copy(clock->uuid, uuid);
_SET(set, _CLOCK_UUID_SET);
} else if (!strcmp(left, "description")) {
char *right;