* Return a 32-bit hash of the given string. */
| 58 | * Return a 32-bit hash of the given string. |
| 59 | */ |
| 60 | static __inline uint32_t |
| 61 | hash32_str(const void *buf, uint32_t hash) |
| 62 | { |
| 63 | const unsigned char *p = buf; |
| 64 | |
| 65 | while (*p) |
| 66 | hash = HASHSTEP(hash, *p++); |
| 67 | |
| 68 | return hash; |
| 69 | } |
| 70 | |
| 71 | /* |
| 72 | * Return a 32-bit hash of the given string, limited by N. |
no outgoing calls
no test coverage detected