We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5815a56 commit 67ce51dCopy full SHA for 67ce51d
src/hash-string.c
@@ -34,7 +34,7 @@ unsigned int string_hash(void *string)
34
p = (unsigned char *) string;
35
36
while (*p != '\0') {
37
- result = ((result << 5) + result ) + *p;
+ result = (result << 5) + result + *p;
38
++p;
39
}
40
@@ -52,7 +52,7 @@ unsigned int string_nocase_hash(void *string)
52
53
54
55
- result = ((result << 5) + result ) + tolower(*p);
+ result = (result << 5) + result + (unsigned int) tolower(*p);
56
57
58
0 commit comments