Clean-up bt_put() implementation
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 19 Jan 2016 18:24:12 +0000 (13:24 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 19 Jan 2016 18:29:49 +0000 (13:29 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/ref.c

index 97460e93522a84505637d3ba80d69fb85c416405..ac0580137a5ad959d25fbfa29b3a3dc0a7ffae19 100644 (file)
--- a/lib/ref.c
+++ b/lib/ref.c
@@ -43,11 +43,13 @@ end:
        return obj;
 }
 
        return obj;
 }
 
-void bt_put(void *obj)
+void bt_put(void *ptr)
 {
 {
-       if (obj) {
-               struct bt_object *base = obj;
+       struct bt_object *obj = ptr;
 
 
-               bt_ref_put(&base->ref_count);
+       if (!obj) {
+               return;
        }
        }
+
+       bt_ref_put(&obj->ref_count);
 }
 }
This page took 0.024511 seconds and 4 git commands to generate.