--- libraries/liblutil/hash.c 2000/09/22 20:19:46 1.1 +++ libraries/liblutil/hash.c 2000/10/17 22:29:21 1.2 @@ -1,19 +1,15 @@ -/* $OpenLDAP$ */ +/* $OpenLDAP: pkg/ldap/libraries/liblutil/hash.c,v 1.1 2000/09/22 20:19:46 kurt Exp $ */ /* This implements the Fowler / Noll / Vo (FNV-1) hash algorithm. * A summary of the algorithm can be found at: * http://www.isthe.com/chongo/tech/comp/fnv/index.html */ #include "portable.h" -#include - -/* include socket.h to get sys/types.h and/or winsock2.h */ -#include #include /* offset and prime for 32-bit FNV-1 */ -#define HASH_OFFSET 0x811c9dc5 +#define HASH_OFFSET 0x811c9dc5U #define HASH_PRIME 16777619 @@ -60,8 +56,8 @@ lutil_HASHFinal( unsigned char *digest, { ber_uint_t h = ctx->hash; - digest[0] = h & 0xff; - digest[1] = (h>>8) & 0xff; - digest[2] = (h>>16) & 0xff; - digest[3] = (h>>24) & 0xff; + digest[0] = h & 0xffU; + digest[1] = (h>>8) & 0xffU; + digest[2] = (h>>16) & 0xffU; + digest[3] = (h>>24) & 0xffU; }