X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Fcommon%2Fbfcr%2Fbfcr.c;h=e3c851793c74595d8f38f8454deedded463784a0;hb=328342cd737582216dc7b8b7d558b2a1bf8ea5e8;hp=992455717d539290a3a3bac83d86a50ec35e30c0;hpb=98b15851a941e7342b8bb19e265cdc3a40fabfb8;p=babeltrace.git diff --git a/src/plugins/ctf/common/bfcr/bfcr.c b/src/plugins/ctf/common/bfcr/bfcr.c index 99245571..e3c85179 100644 --- a/src/plugins/ctf/common/bfcr/bfcr.c +++ b/src/plugins/ctf/common/bfcr/bfcr.c @@ -1,26 +1,10 @@ /* - * Babeltrace - CTF binary field class reader (BFCR) + * SPDX-License-Identifier: MIT * * Copyright (c) 2015-2016 EfficiOS Inc. and Linux Foundation * Copyright (c) 2015-2016 Philippe Proulx * - * 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. + * Babeltrace - CTF binary field class reader (BFCR) */ #define BT_COMP_LOG_SELF_COMP (bfcr->self_comp) @@ -293,7 +277,7 @@ int64_t get_compound_field_class_length(struct bt_bfcr *bfcr, bfcr->user.data); break; default: - abort(); + bt_common_abort(); } return length; @@ -476,7 +460,7 @@ void read_unsigned_bitfield(struct bt_bfcr *bfcr, const uint8_t *buf, size_t at, bt_bitfield_read_le(buf, uint8_t, at, field_size, v); break; default: - abort(); + bt_common_abort(); } BT_COMP_LOGT("Read unsigned bit array: cur=%zu, size=%u, " @@ -495,7 +479,7 @@ void read_signed_bitfield(struct bt_bfcr *bfcr, const uint8_t *buf, size_t at, bt_bitfield_read_le(buf, uint8_t, at, field_size, v); break; default: - abort(); + bt_common_abort(); } BT_COMP_LOGT("Read signed bit array: cur=%zu, size=%u, " @@ -594,7 +578,7 @@ enum bt_bfcr_status read_basic_float_and_call_cb(struct bt_bfcr *bfcr, } default: /* Only 32-bit and 64-bit fields are supported currently */ - abort(); + bt_common_abort(); } BT_COMP_LOGT("Read floating point number value: bfcr=%p, cur=%zu, val=%f", @@ -948,7 +932,7 @@ enum bt_bfcr_status read_basic_begin_state(struct bt_bfcr *bfcr) status = read_basic_string_class_and_call(bfcr, true); break; default: - abort(); + bt_common_abort(); } return status; @@ -973,7 +957,7 @@ enum bt_bfcr_status read_basic_continue_state(struct bt_bfcr *bfcr) status = read_basic_string_class_and_call(bfcr, false); break; default: - abort(); + bt_common_abort(); } return status; @@ -984,7 +968,7 @@ size_t bits_to_skip_to_align_to(struct bt_bfcr *bfcr, size_t align) { size_t aligned_packet_at; - aligned_packet_at = ALIGN(packet_at(bfcr), align); + aligned_packet_at = BT_ALIGN(packet_at(bfcr), align); return aligned_packet_at - packet_at(bfcr); }