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