[glib: 5/17] gdbusproxy: Simplify a pointer theft
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 5/17] gdbusproxy: Simplify a pointer theft
- Date: Mon, 24 Feb 2020 10:01:55 +0000 (UTC)
commit cc11c79e4bcb8116cbb89923d43f1543ce337529
Author: Philip Withnall <withnall endlessm com>
Date: Thu Feb 20 11:47:47 2020 +0000
gdbusproxy: Simplify a pointer theft
This introduces no functional changes.
Signed-off-by: Philip Withnall <withnall endlessm com>
gio/gdbusproxy.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c
index 22ccc830f..4c682978d 100644
--- a/gio/gdbusproxy.c
+++ b/gio/gdbusproxy.c
@@ -1206,8 +1206,7 @@ on_name_owner_changed_get_all_cb (GDBusConnection *connection,
{
G_LOCK (properties_lock);
g_free (data->proxy->priv->name_owner);
- data->proxy->priv->name_owner = data->name_owner;
- data->name_owner = NULL; /* to avoid an extra copy, we steal the string */
+ data->proxy->priv->name_owner = g_steal_pointer (&data->name_owner);
g_hash_table_remove_all (data->proxy->priv->properties);
G_UNLOCK (properties_lock);
if (result != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]