diff options
author | Arno Töll <arno@debian.org> | 2013-10-15 20:19:04 +0200 |
---|---|---|
committer | Arno Töll <arno@debian.org> | 2013-10-15 20:19:04 +0200 |
commit | 1380410981681f011377225708e9c530330fd5a0 (patch) | |
tree | 7dd371bc4cac8910130e4ee0f4508bc519f1778d /src/lemon.c | |
parent | 5b23e76990e58208a01c2a5362362575bc12b397 (diff) | |
download | lighttpd-1380410981681f011377225708e9c530330fd5a0.tar.gz |
Imported Upstream version 1.4.33upstream/1.4.33upstream
Diffstat (limited to 'src/lemon.c')
-rw-r--r-- | src/lemon.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lemon.c b/src/lemon.c index c3d72eb..8751737 100644 --- a/src/lemon.c +++ b/src/lemon.c @@ -3105,7 +3105,7 @@ int mhflag; /* True if generating makeheaders output */ stddt[j] = 0; hash = 0; for(j=0; stddt[j]; j++){ - hash = hash*53 + stddt[j]; + hash = (unsigned int)hash*53u + (unsigned int) stddt[j]; } hash = (hash & 0x7fffffff)%arraysize; while( types[hash] ){ @@ -3751,8 +3751,8 @@ char *s2; PRIVATE int strhash(x) char *x; { - int h = 0; - while( *x) h = h*13 + *(x++); + unsigned int h = 0; + while( *x) h = h*13u + (unsigned int) *(x++); return h; } @@ -4124,9 +4124,9 @@ struct config *b; PRIVATE int statehash(a) struct config *a; { - int h=0; + unsigned int h=0; while( a ){ - h = h*571 + a->rp->index*37 + a->dot; + h = h*571u + (unsigned int)a->rp->index*37u + (unsigned int)a->dot; a = a->bp; } return h; |