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:
Thomas Haller 2017-11-20 12:52:44 +01:00
parent f7d83e681f
commit 898567adfe

View file

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