docs + vartype fix

This commit is contained in:
Krishna Vedala 2020-07-22 12:54:22 -04:00
parent af6a87235a
commit d6dc6df33d
No known key found for this signature in database
GPG Key ID: BA19ACF8FC8792F7

View File

@ -13,12 +13,12 @@
* @brief SDBM algorithm implementation * @brief SDBM algorithm implementation
* *
* @param s NULL terminated string to hash * @param s NULL terminated string to hash
* @return 64-bit * @return 64-bit hash result
*/ */
uint64_t sdbm(const char* s) uint64_t sdbm(const char* s)
{ {
uint64_t hash = 0; uint64_t hash = 0;
int i = 0; size_t i = 0;
while (s[i] != '\0') while (s[i] != '\0')
{ {
hash = s[i] + (hash << 6) + (hash << 16) - hash; hash = s[i] + (hash << 6) + (hash << 16) - hash;