mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 18:30:11 +01:00
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:
parent
45155655f1
commit
3cb5d20c34
1 changed files with 2 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue