From 3cb5d20c34d592b0face47b06823cd5739f0597d Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 16 Jan 2015 18:11:10 +0100 Subject: [PATCH] device: don't add dummy value to @available_connections hash GHashTable is optimized for usage of a set, where the key equals the value. Don't add a dummy value. --- src/devices/nm-device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 64140de7e9..6aad1179fa 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -6947,9 +6947,8 @@ _try_add_available_connection (NMDevice *self, NMConnection *connection) if (nm_device_check_connection_compatible (self, connection)) { if (NM_DEVICE_GET_CLASS (self)->check_connection_available (self, connection, NULL)) { - g_hash_table_insert (NM_DEVICE_GET_PRIVATE (self)->available_connections, - g_object_ref (connection), - GUINT_TO_POINTER (1)); + g_hash_table_add (NM_DEVICE_GET_PRIVATE (self)->available_connections, + g_object_ref (connection)); return TRUE; } }