static const gchar *
get_destination_for_call (GDBusProxy *proxy)
{
- const gchar *ret;
-
- ret = NULL;
-
- /* If proxy->priv->name is a unique name, then proxy->priv->name_owner
- * is never NULL and always the same as proxy->priv->name. We use this
- * knowledge to avoid checking if proxy->priv->name is a unique or
- * well-known name.
- */
- ret = proxy->priv->name_owner;
- if (ret != NULL)
- goto out;
-
if (proxy->priv->flags & G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START)
- goto out;
-
- ret = proxy->priv->name;
+ return proxy->priv->name_owner;
- out:
- return ret;
+ return proxy->priv->name;
}
/* ---------------------------------------------------------------------------------------------------- */