From: Lucas De Marchi Date: Tue, 11 Dec 2012 19:51:34 +0000 (+0000) Subject: edbus: simplify returning new ref of obj/proxy X-Git-Tag: upstream/1.7.8~85 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=090e8206752c63747cc6309a885b197ac0ef0808;p=platform%2Fupstream%2Feldbus.git edbus: simplify returning new ref of obj/proxy Patch by: Lucas De Marchi SVN revision: 80705 --- 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);