hashtable memset issue fix
This commit is contained in:
parent
40a33e7bb7
commit
f49f739333
|
@ -126,7 +126,7 @@ hashtable_expand(switch_hashtable_t *h)
|
|||
realloc(h->table, newsize * sizeof(struct entry *));
|
||||
if (NULL == newtable) { (h->primeindex)--; return 0; }
|
||||
h->table = newtable;
|
||||
memset(newtable[h->tablelength], 0, newsize - h->tablelength);
|
||||
memset(&newtable[h->tablelength], 0, ((newsize - h->tablelength) * sizeof(struct entry*)));
|
||||
for (i = 0; i < h->tablelength; i++) {
|
||||
for (pE = &(newtable[i]), e = *pE; e != NULL; e = *pE) {
|
||||
index = indexFor(newsize,e->h);
|
||||
|
|
Loading…
Reference in New Issue