com php-src: The compiler can figure this out: ext/standard/string.c

From: Date: Mon, 14 Jan 2013 11:22:42 +0000
Subject: com php-src: The compiler can figure this out: ext/standard/string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-70981@lists.php.net to get a copy of this message
Commit: e5029ac40bd84fd3545538afa013051e161d86a4 Author: Gustavo Lopes <glopes@nebm.ist.utl.pt> Wed, 9 Jan 2013 23:20:32 +0100 Committer: Gustavo Lopes <gustavo@icemobile.com> Mon, 14 Jan 2013 12:22:42 +0100 Parents: 93d1171c47d10158e6e9855236277deb09cf7e6b Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e5029ac40bd84fd3545538afa013051e161d86a4 Log: The compiler can figure this out Changed paths: M ext/standard/string..c Diff: diff --git a/ext/standard/string.c b/ext/standard/string..c index 14259ca..c7ed884 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;

« previous php.cvs (#70981) next »