提交 7e9c3505 authored 作者: Anthony Minessale's avatar Anthony Minessale

avoid recomputing hash

上级 f1d77217
...@@ -211,7 +211,7 @@ switch_hashtable_remove(switch_hashtable_t *h, void *k) ...@@ -211,7 +211,7 @@ switch_hashtable_remove(switch_hashtable_t *h, void *k)
unsigned int hashvalue, index; unsigned int hashvalue, index;
hashvalue = hash(h,k); hashvalue = hash(h,k);
index = indexFor(h->tablelength,hash(h,k)); index = indexFor(h->tablelength,hashvalue);
pE = &(h->table[index]); pE = &(h->table[index]);
e = *pE; e = *pE;
while (NULL != e) { while (NULL != e) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论