| 20 | #define FNV_64_PRIME ((Fnv64_t) 0x100000001b3ULL) |
| 21 | |
| 22 | static __inline Fnv32_t |
| 23 | fnv_32_buf(const void *buf, size_t len, Fnv32_t hval) |
| 24 | { |
| 25 | const u_int8_t *s = (const u_int8_t *)buf; |
| 26 | |
| 27 | while (len-- != 0) { |
| 28 | hval *= FNV_32_PRIME; |
| 29 | hval ^= *s++; |
| 30 | } |
| 31 | return hval; |
| 32 | } |
| 33 | |
| 34 | static __inline Fnv32_t |
| 35 | fnv_32_str(const char *str, Fnv32_t hval) |
no outgoing calls
no test coverage detected