diff options
author | Thomas Haller <thaller@redhat.com> | 2017-11-20 12:52:44 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-11-23 14:44:24 +0100 |
commit | 898567adfec49f22f23b633201c8d480b1a054fd (patch) | |
tree | b4571cff2bf3a20835f53d13a6e3c89d0782ad75 | |
parent | f7d83e681fb634be3f11cbf6df29122ebbf7c6e3 (diff) | |
download | NetworkManager-898567adfec49f22f23b633201c8d480b1a054fd.tar.gz |
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.
-rw-r--r-- | src/platform/nmp-object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c index 4b511ff2f5..ee4014ac3c 100644 --- a/src/platform/nmp-object.c +++ b/src/platform/nmp-object.c @@ -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); |