summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2023-08-16 16:24:02 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2023-08-31 11:15:34 +0100
commitd10e5d30e561104e727728238efebb68ac5ad992 (patch)
treebf07f6ff31ea5f1d42fe4d871319cf4c2ff64612
parent18fb55bf055fe226002249efb29287a74a7d192e (diff)
downloadglib-d10e5d30e561104e727728238efebb68ac5ad992.tar.gz
gdbusconnection: Combine two identical variables
`object_path` and `path` were doing exactly the same thing here. This introduces no functional changes. Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
-rw-r--r--gio/gdbusconnection.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 65ece54b2..bc3c067dc 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -7186,10 +7186,9 @@ distribute_method_call (GDBusConnection *connection,
GDBusMessage *reply;
ExportedObject *eo;
ExportedSubtree *es;
- const gchar *object_path;
+ const gchar *path;
const gchar *interface_name;
const gchar *member;
- const gchar *path;
gchar *subtree_path;
gchar *needle;
gboolean object_found = FALSE;
@@ -7228,17 +7227,14 @@ distribute_method_call (GDBusConnection *connection,
_g_dbus_debug_print_unlock ();
}
- object_path = g_dbus_message_get_path (message);
- g_assert (object_path != NULL);
-
- eo = g_hash_table_lookup (connection->map_object_path_to_eo, object_path);
+ eo = g_hash_table_lookup (connection->map_object_path_to_eo, path);
if (eo != NULL)
{
if (obj_message_func (connection, eo, message, &object_found))
goto out;
}
- es = g_hash_table_lookup (connection->map_object_path_to_es, object_path);
+ es = g_hash_table_lookup (connection->map_object_path_to_es, path);
if (es != NULL)
{
if (subtree_message_func (connection, es, message))
@@ -7265,14 +7261,14 @@ distribute_method_call (GDBusConnection *connection,
"org.freedesktop.DBus.Error.UnknownMethod",
_("No such interface ā€œ%sā€ on object at path %s"),
interface_name,
- object_path);
+ path);
}
else
{
reply = g_dbus_message_new_method_error (message,
"org.freedesktop.DBus.Error.UnknownMethod",
_("Object does not exist at path ā€œ%sā€"),
- object_path);
+ path);
}
g_dbus_connection_send_message_unlocked (connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);