summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-03-09 10:56:06 +0100
committerMaria Matejka <mq@ucw.cz>2022-03-09 10:56:06 +0100
commit83d9920f90738e4df75b3cf57335b43c094051cd (patch)
treeef427685ad08c0ca468db1c0c2f462c3b79b3c14 /lib
parentff47cd80dd04bc11692248a40cbf52ee8d351064 (diff)
parent5cff1d5f022755df61af6fc21cc4f2e5d384404e (diff)
Merge commit '5cff1d5f' into haugesund
Conflicts: proto/bgp/attrs.c proto/pipe/pipe.c
Diffstat (limited to 'lib')
-rw-r--r--lib/hash.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/hash.h b/lib/hash.h
index ea4ca6dd..8febb33f 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -215,6 +215,12 @@ mem_hash_mix(u64 *h, const void *p, uint s)
*h = *h * multiplier + pp[i];
}
+static inline void
+mem_hash_mix_num(u64 *h, u64 val)
+{
+ mem_hash_mix(h, &val, sizeof(val));
+}
+
static inline uint
mem_hash_value(u64 *h)
{