mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 04:00:32 +01:00
device: optimize hashtable usage for shared_ips
No point ins storing "TRUE" as value in the @shared_ips hash table. That forces glib to allocate a separate storage for the value. Just use g_hash_table_add() instead.
This commit is contained in:
parent
6c12f04e87
commit
60cc501a66
1 changed files with 1 additions and 4 deletions
|
|
@ -4672,10 +4672,7 @@ reserve_shared_ip (NMDevice *self, NMSettingIPConfig *s_ip4, NMPlatformIP4Addres
|
|||
}
|
||||
}
|
||||
nm_platform_ip4_address_set_addr (address, start + count, 24);
|
||||
|
||||
g_hash_table_insert (shared_ips,
|
||||
GUINT_TO_POINTER (address->address),
|
||||
GUINT_TO_POINTER (TRUE));
|
||||
g_hash_table_add (shared_ips, GUINT_TO_POINTER (address->address));
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue