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-22 10:34:34 +0100
commit45b64aa16c8bdff080474aeab78af82c089812e2 (patch)
treec4c8f555cdbd89bfa0b3a1a9adac522f48d69f5f
parent02e47ec27a236fed04324ceadb92b93d8bcde0e6 (diff)
downloadNetworkManager-45b64aa16c8bdff080474aeab78af82c089812e2.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);