Skip to content

Commit 67ce51d

Browse files
committed
Fix warning.
1 parent 5815a56 commit 67ce51d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hash-string.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ unsigned int string_hash(void *string)
3434
p = (unsigned char *) string;
3535

3636
while (*p != '\0') {
37-
result = ((result << 5) + result ) + *p;
37+
result = (result << 5) + result + *p;
3838
++p;
3939
}
4040

@@ -52,7 +52,7 @@ unsigned int string_nocase_hash(void *string)
5252
p = (unsigned char *) string;
5353

5454
while (*p != '\0') {
55-
result = ((result << 5) + result ) + tolower(*p);
55+
result = (result << 5) + result + (unsigned int) tolower(*p);
5656
++p;
5757
}
5858

0 commit comments

Comments
 (0)