Simpler method for mixing and clipping when computing a second-try hash value
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 28 Sep 2008 04:04:10 +0000 (04:04 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 28 Sep 2008 04:04:10 +0000 (04:04 +0000)
includes/memcached-client.php

index e1a8d44..7974530 100644 (file)
@@ -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;