apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r545432 - /apr/apr-util/trunk/memcache/apr_memcache.c
Date Fri, 08 Jun 2007 06:13:50 GMT
Author: pquerna
Date: Thu Jun  7 23:13:49 2007
New Revision: 545432

URL: http://svn.apache.org/viewvc?view=rev&rev=545432
Log:
While extremely unlikely, its possible that a key hash could be zero.  Maintain the behavoir
of other clients, and set the hash to 1.

Modified:
    apr/apr-util/trunk/memcache/apr_memcache.c

Modified: apr/apr-util/trunk/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/memcache/apr_memcache.c?view=diff&rev=545432&r1=545431&r2=545432
==============================================================================
--- apr/apr-util/trunk/memcache/apr_memcache.c (original)
+++ apr/apr-util/trunk/memcache/apr_memcache.c Thu Jun  7 23:13:49 2007
@@ -161,7 +161,7 @@
                                       const apr_uint32_t hash)
 {
     apr_memcache_server_t *ms = NULL;
-    apr_uint32_t h = hash;
+    apr_uint32_t h = hash ? hash : 1;
     apr_uint32_t i = 0;
     apr_time_t curtime = 0;
    



Mime
View raw message