From b0f96a03f73edbb885b6b299dcd936860136872f Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 28 Sep 2008 04:04:10 +0000 Subject: [PATCH] Simpler method for mixing and clipping when computing a second-try hash value --- includes/memcached-client.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; -- 2.20.1