Skip to content

Commit

Permalink
Eliminate compilation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hmgle committed Jul 31, 2018
1 parent 00a5c0a commit 81b3870
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion string-set.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static unsigned long str_hash(const char *str)
unsigned long hash = 5381;
int c;

while (c = *str++)
while ((c = *str++) != '\0')
hash = ((hash << 5) + hash) + c; /* hash * 33 + c */

return hash;
Expand Down

0 comments on commit 81b3870

Please sign in to comment.