mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 16:00:21 +01:00
platform: don't return zero from nmp_object_id_hash()
There is no principle problem with returning zero has hash value. But just don't do it. Our hash functions should not return zero. Instead, return nm_hash_static(). This is why the function exists.
This commit is contained in:
parent
f7d83e681f
commit
898567adfe
1 changed files with 1 additions and 1 deletions
|
|
@ -1070,7 +1070,7 @@ nmp_object_id_hash (const NMPObject *obj)
|
|||
NMHashState h;
|
||||
|
||||
if (!obj)
|
||||
return 0;
|
||||
return nm_hash_static (914932607u);
|
||||
|
||||
nm_hash_init (&h, 914932607u);
|
||||
nmp_object_id_hash_update (obj, &h);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue