From 5ed148bee3a98234ee952984e56b4e1b6791c1cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 3 Nov 2016 16:33:48 -0400 Subject: [PATCH] Remove unnecessary check of release callback on bt_ref_get MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- include/babeltrace/ref-internal.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/include/babeltrace/ref-internal.h b/include/babeltrace/ref-internal.h index 3a8b39f41..8578de97b 100644 --- a/include/babeltrace/ref-internal.h +++ b/include/babeltrace/ref-internal.h @@ -50,12 +50,9 @@ static inline void bt_ref_get(struct bt_ref *ref) { assert(ref); - if (ref->release) { - /* Object has opted-in reference counting. */ - ref->count++; - /* Overflow check. */ - assert(ref->count); - } + ref->count++; + /* Overflow check. */ + assert(ref->count); } static inline -- 2.34.1