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.
This commit is contained in:
Thomas Haller 2015-01-16 18:11:10 +01:00
parent 45155655f1
commit 3cb5d20c34

View file

@ -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;
}
}