X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Flib%2Ftrace-ir%2Ffield-path.c;h=60e0aca992f945481715c04db88f146b5af82cbf;hb=d5b13b9b6a434797f856547be1ca6a59f70ba530;hp=230db9dd53ecf7b15583f15878c2d1d857d0e103;hpb=bdb288b3e94e412a33c8647d44f6cfac66ca0665;p=babeltrace.git diff --git a/src/lib/trace-ir/field-path.c b/src/lib/trace-ir/field-path.c index 230db9dd..60e0aca9 100644 --- a/src/lib/trace-ir/field-path.c +++ b/src/lib/trace-ir/field-path.c @@ -1,32 +1,16 @@ /* + * SPDX-License-Identifier: MIT + * * Copyright 2016-2018 Philippe Proulx * Copyright 2013, 2014 Jérémie Galarneau - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. */ #define BT_LOG_TAG "LIB/FIELD-PATH" #include "lib/logging.h" -#include "lib/assert-pre.h" +#include "lib/assert-cond.h" #include -#include +#include #include #include #include @@ -79,23 +63,23 @@ end: return field_path; } -enum bt_scope bt_field_path_get_root_scope( +enum bt_field_path_scope bt_field_path_get_root_scope( const struct bt_field_path *field_path) { - BT_ASSERT_PRE_DEV_NON_NULL(field_path, "Field path"); + BT_ASSERT_PRE_DEV_FP_NON_NULL(field_path); return field_path->root; } uint64_t bt_field_path_get_item_count(const struct bt_field_path *field_path) { - BT_ASSERT_PRE_DEV_NON_NULL(field_path, "Field path"); + BT_ASSERT_PRE_DEV_FP_NON_NULL(field_path); return (uint64_t) field_path->items->len; } const struct bt_field_path_item *bt_field_path_borrow_item_by_index_const( const struct bt_field_path *field_path, uint64_t index) { - BT_ASSERT_PRE_DEV_NON_NULL(field_path, "Field path"); + BT_ASSERT_PRE_DEV_FP_NON_NULL(field_path); BT_ASSERT_PRE_DEV_VALID_INDEX(index, field_path->items->len); return bt_field_path_borrow_item_by_index_inline(field_path, index); }