X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fctf-writer%2Fobject.c;h=cf4e3f082d2acdd4346e3f5c49e1d8d1385c7adb;hb=1353b066072e6c389ff35853bac83f65597e7a6a;hp=616fcf3658b3a89f1549724911655cab9764cee8;hpb=578e048b5debf169e286e5b5cc747b5d6c16886d;p=babeltrace.git diff --git a/src/ctf-writer/object.c b/src/ctf-writer/object.c index 616fcf36..cf4e3f08 100644 --- a/src/ctf-writer/object.c +++ b/src/ctf-writer/object.c @@ -1,30 +1,16 @@ /* - * Copyright (c) 2015 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: + * SPDX-License-Identifier: MIT * - * 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. + * Copyright (c) 2015 Jérémie Galarneau */ #include "object.h" +#include +BT_EXPORT void *bt_ctf_object_get_ref(void *obj) { - if (unlikely(!obj)) { + if (G_UNLIKELY(!obj)) { goto end; } @@ -34,9 +20,10 @@ end: return obj; } +BT_EXPORT void bt_ctf_object_put_ref(void *obj) { - if (unlikely(!obj)) { + if (G_UNLIKELY(!obj)) { return; }