Document field-path.h (API)
[babeltrace.git] / include / babeltrace / ref-internal.h
index 3a8b39f4136139807ba6c207b77725fe8554a499..cf1547da9615345df8977f5fd95c8d7fb4fe3a57 100644 (file)
@@ -50,12 +50,14 @@ 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);
+
+       if (!ref->release) {
+               return;
        }
+
+       ref->count++;
+       /* Overflow check. */
+       assert(ref->count);
 }
 
 static inline
This page took 0.029153 seconds and 4 git commands to generate.