From: Jérémie Galarneau Date: Thu, 3 Nov 2016 20:33:48 +0000 (-0400) Subject: Remove unnecessary check of release callback on bt_ref_get X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=5ed148bee3a98234ee952984e56b4e1b6791c1cf;p=deliverable%2Fbabeltrace.git Remove unnecessary check of release callback on bt_ref_get Signed-off-by: Jérémie Galarneau --- 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