From 0beff2477b55728603127f21a9df604b6fcf840c Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 3 Jul 2023 11:10:09 +0000 Subject: Refactor cdbmake, add cdbmake_addv, cdb_hashv Signed-off-by: Laurent Bercot --- src/libstddjb/cdb_hashadd.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/libstddjb/cdb_hashadd.c (limited to 'src/libstddjb/cdb_hashadd.c') diff --git a/src/libstddjb/cdb_hashadd.c b/src/libstddjb/cdb_hashadd.c new file mode 100644 index 0000000..426fb95 --- /dev/null +++ b/src/libstddjb/cdb_hashadd.c @@ -0,0 +1,9 @@ +/* ISC license. */ + +#include "cdb-internal.h" + +uint32_t cdb_hashadd (uint32_t h, uint8_t c) +{ + h += (h << 5) ; + return h ^ c ; +} -- cgit v1.2.3