mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 22:58:16 +02:00
wifi/iwd: use NMHashState (siphash24) for hashing
We shall use nm_hash_*() functions everywhere where we need a hash for a dictionary.
This commit is contained in:
parent
be875fe382
commit
ccf36ff4ce
1 changed files with 6 additions and 1 deletions
|
|
@ -298,7 +298,12 @@ known_network_id_new (const char *name, NMIwdNetworkSecurity security)
|
||||||
static guint
|
static guint
|
||||||
known_network_id_hash (KnownNetworkId *id)
|
known_network_id_hash (KnownNetworkId *id)
|
||||||
{
|
{
|
||||||
return g_str_hash (id->name) + id->security;
|
NMHashState h;
|
||||||
|
|
||||||
|
nm_hash_init (&h, 1947951703u);
|
||||||
|
nm_hash_update_val (&h, id->security);
|
||||||
|
nm_hash_update_str (&h, id->name);
|
||||||
|
return nm_hash_complete (&h);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue