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);
+
+ if (!ref->release) {
+ return;
}
+
+ ref->count++;
+ /* Overflow check. */
+ assert(ref->count);
}
static inline