Matches the hash function used in devtools/sql-rewrite.py */
| 6 | |
| 7 | /* Matches the hash function used in devtools/sql-rewrite.py */ |
| 8 | static u32 hash_djb2(const char *str) |
| 9 | { |
| 10 | u32 hash = 5381; |
| 11 | for (size_t i = 0; str[i]; i++) |
| 12 | hash = ((hash << 5) + hash) ^ str[i]; |
| 13 | return hash; |
| 14 | } |
| 15 | |
| 16 | size_t db_query_colnum(const struct db_stmt *stmt, |
| 17 | const char *colname) |
no outgoing calls
no test coverage detected