forked from enlightenment/efl
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:
parent
85192f5045
commit
07e21b19c8
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue