| 16 | } |
| 17 | |
| 18 | unsigned int strihash(const char *str) |
| 19 | { |
| 20 | unsigned int c, hash = FNV32_BASE; |
| 21 | while ((c = (unsigned char) *str++)) { |
| 22 | if (c >= 'a' && c <= 'z') |
| 23 | c -= 'a' - 'A'; |
| 24 | hash = (hash * FNV32_PRIME) ^ c; |
| 25 | } |
| 26 | return hash; |
| 27 | } |
| 28 | |
| 29 | unsigned int memhash(const void *buf, size_t len) |
| 30 | { |
no outgoing calls
no test coverage detected