diff options
Diffstat (limited to 'src/libstddjb/cdb_hashadd.c')
-rw-r--r-- | src/libstddjb/cdb_hashadd.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 ; +} |