| 30 | #include "os/os_specific.h" |
| 31 | |
| 32 | uint32_t strhash(const char *str, uint32_t seed) |
| 33 | { |
| 34 | if(str == NULL) |
| 35 | return seed; |
| 36 | |
| 37 | uint32_t hash = seed; |
| 38 | int c = *str; |
| 39 | str++; |
| 40 | |
| 41 | while(c) |
| 42 | { |
| 43 | hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ |
| 44 | c = *str; |
| 45 | str++; |
| 46 | } |
| 47 | |
| 48 | return hash; |
| 49 | } |
| 50 | |
| 51 | uint32_t strhash(const char *str) |
| 52 | { |
no outgoing calls
no test coverage detected