From: Tim Starling Date: Sun, 28 Sep 2008 04:04:10 +0000 (+0000) Subject: Simpler method for mixing and clipping when computing a second-try hash value X-Git-Tag: 1.31.0-rc.0~45056 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=b0f96a03f73edbb885b6b299dcd936860136872f;p=lhc%2Fweb%2Fwiklou.git Simpler method for mixing and clipping when computing a second-try hash value --- diff --git a/includes/memcached-client.php b/includes/memcached-client.php index e1a8d449de..7974530929 100644 --- a/includes/memcached-client.php +++ b/includes/memcached-client.php @@ -800,9 +800,8 @@ class memcached if (is_resource($sock)) { $this->_flush_read_buffer($sock); return $sock; - } - $hv += $this->_hashfunc($tries . $realkey); - $hv = $hv & 0x7fffffff; // don't let this pass the limit and go negative (bug 12342) + } + $hv = $this->_hashfunc( $hv . $realkey ); } return false;