Unverified Commit 4fc20992 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #5128 from kingpeterpaule/remove-one-loop-in-freeMemoryIfNeeded

remove ineffective loop in dictGetSomeKeys.
parents 9fbd49bb b6ce7d5d
...@@ -705,8 +705,10 @@ unsigned int dictGetSomeKeys(dict *d, dictEntry **des, unsigned int count) { ...@@ -705,8 +705,10 @@ unsigned int dictGetSomeKeys(dict *d, dictEntry **des, unsigned int count) {
* table, there will be no elements in both tables up to * table, there will be no elements in both tables up to
* the current rehashing index, so we jump if possible. * the current rehashing index, so we jump if possible.
* (this happens when going from big to small table). */ * (this happens when going from big to small table). */
if (i >= d->ht[1].size) i = d->rehashidx; if (i >= d->ht[1].size)
continue; i = d->rehashidx;
else
continue;
} }
if (i >= d->ht[j].size) continue; /* Out of range for this table. */ if (i >= d->ht[j].size) continue; /* Out of range for this table. */
dictEntry *he = d->ht[j].table[i]; dictEntry *he = d->ht[j].table[i];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment