From 6ba98a9f9f48e13738d9736cba9c45b5e94f42f2 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 14 Apr 2008 21:52:55 -0400 Subject: Initial import --- server/.svn/text-base/cdb_hash.c.svn-base | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 server/.svn/text-base/cdb_hash.c.svn-base (limited to 'server/.svn/text-base/cdb_hash.c.svn-base') diff --git a/server/.svn/text-base/cdb_hash.c.svn-base b/server/.svn/text-base/cdb_hash.c.svn-base new file mode 100644 index 0000000..b664ba9 --- /dev/null +++ b/server/.svn/text-base/cdb_hash.c.svn-base @@ -0,0 +1,18 @@ +#include "conf.h" +#include "cdbpriv.h" + +RCSID("$Id: cdb_hash.c,v 1.2 2000/02/29 19:31:33 shmit Exp $"); + +uint32_t +cdb_hash(const unsigned char *buf, unsigned int len) +{ + uint32_t h; + + h = 5381; + while (len) { + --len; + h += (h << 5); + h ^= (uint32_t)*buf++; + } + return h; +} -- cgit v1.2.3