r41334 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41333‎ | r41334 | r41335 >
Date:04:04, 28 September 2008
Author:tstarling
Status:old
Tags:
Comment:
Simpler method for mixing and clipping when computing a second-try hash value
Modified paths:
  • /trunk/phase3/includes/memcached-client.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/memcached-client.php
@@ -800,9 +800,8 @@
801801 if (is_resource($sock)) {
802802 $this->_flush_read_buffer($sock);
803803 return $sock;
804 - }
805 - $hv += $this->_hashfunc($tries . $realkey);
806 - $hv = $hv & 0x7fffffff; // don't let this pass the limit and go negative (bug 12342)
 804+ }
 805+ $hv = $this->_hashfunc( $hv . $realkey );
807806 }
808807
809808 return false;