]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/hashmap.c
Merge pull request #2153 from evverx/fix-verify-for-templates
[thirdparty/systemd.git] / src / basic / hashmap.c
index 015cc629b17bf9287c3d35fc1087575f4135b905..286ddfef5b38024d201460469c90601dfa05d1ce 100644 (file)
 ***/
 
 #include <errno.h>
-#include <pthread.h>
+#include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 
+#include "alloc-util.h"
 #include "hashmap.h"
 #include "macro.h"
 #include "mempool.h"
@@ -35,6 +37,7 @@
 #include "util.h"
 
 #ifdef ENABLE_DEBUG_HASHMAP
+#include <pthread.h>
 #include "list.h"
 #endif
 
@@ -379,7 +382,7 @@ static unsigned base_bucket_hash(HashmapBase *h, const void *p) {
 
         h->hash_ops->hash(p, &state);
 
-        siphash24_finalize((uint8_t*)&hash, &state);
+        hash = siphash24_finalize(&state);
 
         return (unsigned) (hash % n_buckets(h));
 }