summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-11-20 12:52:44 +0100
committerThomas Haller <thaller@redhat.com>2017-11-23 14:44:24 +0100
commit898567adfec49f22f23b633201c8d480b1a054fd (patch)
treeb4571cff2bf3a20835f53d13a6e3c89d0782ad75
parentf7d83e681fb634be3f11cbf6df29122ebbf7c6e3 (diff)
downloadNetworkManager-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.c2
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);