3 #define FNV1A_32A_INIT (unsigned int)0x811c9dc5
4 #define FNV_32_PRIME (unsigned int)0x01000193
6 unsigned int rbtdb_fnv1a(TDB_DATA
* data
)
8 unsigned char *bp
= data
->dptr
;
9 unsigned char *be
= bp
+ data
->dsize
;
10 unsigned int h
= FNV1A_32A_INIT
;
12 /* FNV-1a hash each octet in the buffer */
15 /* xor the bottom with the current octet */
18 /* multiply by the 32 bit FNV magic prime mod 2^32 */
19 #if defined(NO_FNV_GCC_OPTIMIZATION)
22 h
+= (h
<< 1) + (h
<< 4) + (h
<< 7) + (h
<< 8) + (h
<< 24);
26 /* return our new hash value */