diff options
author | Thomas Haller <thaller@redhat.com> | 2015-01-16 18:11:10 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-02-24 17:43:39 +0100 |
commit | b09b501766c3d4deac2f1b5f02648529809611e6 (patch) | |
tree | 6650e25bc185dd661328e4111630f158478c9d2e | |
parent | 1d1947b25ea190a17fcd149fdbeadcdd6c73bdc2 (diff) | |
download | NetworkManager-b09b501766c3d4deac2f1b5f02648529809611e6.tar.gz |
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.
(cherry picked from commit 3cb5d20c34d592b0face47b06823cd5739f0597d)
-rw-r--r-- | src/devices/nm-device.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index dc41341c63..c2c2a3f63f 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -6874,9 +6874,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; } } |