X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=lib%2Fctf-ir%2Fresolve.c;h=049ddda73c391065c859b538c9d733c943d3a8e8;hb=f6ccaed94e575af57fe6bf38154771bee4871a2a;hp=2a6ba2b2f7b39b8ddc69425e11a8a933517c8d28;hpb=464ebc311d460b29f681703aea0aa00eef9e6475;p=babeltrace.git diff --git a/lib/ctf-ir/resolve.c b/lib/ctf-ir/resolve.c index 2a6ba2b2..049ddda7 100644 --- a/lib/ctf-ir/resolve.c +++ b/lib/ctf-ir/resolve.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -257,7 +258,7 @@ static struct bt_field_type *get_type_from_ctx(struct resolve_context *ctx, enum bt_scope scope) { - assert(scope >= BT_SCOPE_TRACE_PACKET_HEADER && + BT_ASSERT(scope >= BT_SCOPE_TRACE_PACKET_HEADER && scope <= BT_SCOPE_EVENT_FIELDS); return ctx->scopes[scope - BT_SCOPE_TRACE_PACKET_HEADER]; @@ -833,7 +834,7 @@ int get_field_paths_lca_index(struct bt_field_path *field_path1, /* * Start from both roots and find the first mismatch. */ - assert(field_path1->root == field_path2->root); + BT_ASSERT(field_path1->root == field_path2->root); field_path1_len = field_path1->indexes->len; field_path2_len = field_path2->indexes->len; @@ -1218,7 +1219,7 @@ int resolve_root_type(enum bt_scope root_scope, struct resolve_context *ctx) { int ret; - assert(type_stack_size(ctx->type_stack) == 0); + BT_ASSERT(type_stack_size(ctx->type_stack) == 0); ctx->root_scope = root_scope; ret = resolve_type(get_type_from_ctx(ctx, root_scope), ctx); ctx->root_scope = BT_SCOPE_UNKNOWN;