X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Flib%2Fobject.h;h=61a502f4254f1a98855c86e30cce553e161922b9;hb=91d8147391efdc4d42cc4e1c171a65c0372a008f;hp=c3afd73f744459f6ec4beb5e2dd67b14c6a6741d;hpb=578e048b5debf169e286e5b5cc747b5d6c16886d;p=babeltrace.git diff --git a/src/lib/object.h b/src/lib/object.h index c3afd73f..61a502f4 100644 --- a/src/lib/object.h +++ b/src/lib/object.h @@ -24,7 +24,7 @@ * SOFTWARE. */ -#include "common/babeltrace.h" +#include "common/macros.h" #include "common/assert.h" #include @@ -281,7 +281,7 @@ void bt_object_get_no_null_check(const void *c_obj) BT_ASSERT(obj); BT_ASSERT(obj->is_shared); - if (unlikely(obj->parent && bt_object_get_ref_count(obj) == 0)) { + if (G_UNLIKELY(obj->parent && bt_object_get_ref_count(obj) == 0)) { #ifdef BT_LOGV BT_LOGV("Incrementing object's parent's reference count: " "addr=%p, parent-addr=%p", obj, obj->parent); @@ -329,7 +329,7 @@ void bt_object_get_ref(const void *ptr) { struct bt_object *obj = (void *) ptr; - if (unlikely(!obj)) { + if (G_UNLIKELY(!obj)) { return; } @@ -345,7 +345,7 @@ void bt_object_put_ref(const void *ptr) { struct bt_object *obj = (void *) ptr; - if (unlikely(!obj)) { + if (G_UNLIKELY(!obj)) { return; }