| 32 | } |
| 33 | |
| 34 | static __inline Fnv32_t |
| 35 | fnv_32_str(const char *str, Fnv32_t hval) |
| 36 | { |
| 37 | const u_int8_t *s = (const u_int8_t *)str; |
| 38 | Fnv32_t c; |
| 39 | |
| 40 | while ((c = *s++) != 0) { |
| 41 | hval *= FNV_32_PRIME; |
| 42 | hval ^= c; |
| 43 | } |
| 44 | return hval; |
| 45 | } |
| 46 | |
| 47 | static __inline Fnv64_t |
| 48 | fnv_64_buf(const void *buf, size_t len, Fnv64_t hval) |
no outgoing calls
no test coverage detected