From: Gustavo Lopes Date: Wed, 9 Jan 2013 22:20:32 +0000 (+0100) Subject: The compiler can figure this out X-Git-Tag: php-5.4.12RC1~9^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5029ac40bd84fd3545538afa013051e161d86a4;p=php The compiler can figure this out --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 14259cabc0..c7ed8844f1 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2821,7 +2821,7 @@ static inline HASH php_strtr_hash(const char *str, int len) HASH res = 0; int i; for (i = 0; i < len; i++) { - res = (res << 5) + res + (unsigned char)str[i]; + res = res * 33 + (unsigned char)str[i]; } return res;