hash: Change mhash_finish() data measurement from words to bytes.
[sliver-openvswitch.git] / lib / hash.h
index 96866c4..d33924f 100644 (file)
@@ -149,9 +149,9 @@ static inline uint32_t mhash_add(uint32_t hash, uint32_t data)
     return hash * 5 + 0xe6546b64;
 }
 
-static inline uint32_t mhash_finish(uint32_t hash, size_t n)
+static inline uint32_t mhash_finish(uint32_t hash, size_t n_bytes)
 {
-    hash ^= n * 4;
+    hash ^= n_bytes;
     hash ^= hash >> 16;
     hash *= 0x85ebca6b;
     hash ^= hash >> 13;