Przeglądaj źródła

ZOOKEEPER-1229. C client hashtable_remove redundantly calls hash function (Harsh J via phunt)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1225919 13f79535-47bb-0310-9956-ffa450edef68
Patrick D. Hunt 13 lat temu
rodzic
commit
03ce9fc9c4
2 zmienionych plików z 5 dodań i 1 usunięć
  1. 4 0
      CHANGES.txt
  2. 1 1
      src/c/src/hashtable/hashtable.c

+ 4 - 0
CHANGES.txt

@@ -163,6 +163,10 @@ IMPROVEMENTS:
   ZOOKEEPER-1342. quorum Listener & LearnerCnxAcceptor are missing
   thread names (Rakesh R via phunt)
 
+  ZOOKEEPER-1229. C client hashtable_remove redundantly calls hash function
+  (Harsh J via phunt)
+
+
 Release 3.4.0 - 
 
 Non-backward compatible changes:

+ 1 - 1
src/c/src/hashtable/hashtable.c

@@ -189,7 +189,7 @@ hashtable_remove(struct hashtable *h, void *k)
     unsigned int hashvalue, index;
 
     hashvalue = hash(h,k);
-    index = indexFor(h->tablelength,hash(h,k));
+    index = indexFor(h->tablelength, hashvalue);
     pE = &(h->table[index]);
     e = *pE;
     while (NULL != e)