edbus: simplify returning new ref of obj/proxy

Patch by: Lucas De Marchi <lucas.de.marchi@gmail.com>



SVN revision: 80705
This commit is contained in:
Lucas De Marchi 2012-12-11 19:51:34 +00:00 committed by Lucas De Marchi
parent 85192f5045
commit 07e21b19c8
2 changed files with 2 additions and 8 deletions

View File

@ -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);

View File

@ -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);