asdfuser pushed a commit to branch master.

commit 090e8206752c63747cc6309a885b197ac0ef0808
Author: Lucas De Marchi <[email protected]>
Date:   Tue Dec 11 19:51:34 2012 +0000

    edbus: simplify returning new ref of obj/proxy
    
    Patch by: Lucas De Marchi <[email protected]>
    
    
    
    SVN revision: 80705
---
 src/lib/edbus_object.c | 5 +----
 src/lib/edbus_proxy.c  | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/lib/edbus_object.c b/src/lib/edbus_object.c
index 6ff2450..647b6fa 100644
--- a/src/lib/edbus_object.c
+++ b/src/lib/edbus_object.c
@@ -195,10 +195,7 @@ edbus_object_get(EDBus_Connection *conn, const char *bus, 
const char *path)
 
    obj = edbus_connection_name_object_get(conn, bus, path);
    if (obj)
-     {
-        edbus_object_ref(obj);
-        return obj;
-     }
+     return edbus_object_ref(obj);
 
    obj = calloc(1, sizeof(EDBus_Object));
    EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
diff --git a/src/lib/edbus_proxy.c b/src/lib/edbus_proxy.c
index c8ccadd..a2092da 100644
--- a/src/lib/edbus_proxy.c
+++ b/src/lib/edbus_proxy.c
@@ -205,10 +205,7 @@ edbus_proxy_get(EDBus_Object *obj, const char *interface)
 
    proxy = edbus_object_proxy_get(obj, interface);
    if (proxy)
-     {
-        edbus_proxy_ref(proxy);
-        return proxy;
-     }
+     return edbus_proxy_ref(proxy);
 
    proxy = calloc(1, sizeof(EDBus_Proxy));
    EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);

-- 

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d

Reply via email to