* Return a 32-bit hash of the given buffer. The init * value should be 0, or the previous hash value to extend * the previous hash. */
| 44 | * the previous hash. |
| 45 | */ |
| 46 | static __inline uint32_t |
| 47 | hash32_buf(const void *buf, size_t len, uint32_t hash) |
| 48 | { |
| 49 | const unsigned char *p = buf; |
| 50 | |
| 51 | while (len--) |
| 52 | hash = HASHSTEP(hash, *p++); |
| 53 | |
| 54 | return hash; |
| 55 | } |
| 56 | |
| 57 | /* |
| 58 | * Return a 32-bit hash of the given string. |
no outgoing calls
no test coverage detected