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

remove ineffective loop in dictGetSomeKeys.
This commit is contained in:
Salvatore Sanfilippo 2018-07-17 10:38:55 +02:00 committed by GitHub
commit 4fc2099235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -705,7 +705,9 @@ unsigned int dictGetSomeKeys(dict *d, dictEntry **des, unsigned int count) {
* table, there will be no elements in both tables up to
* the current rehashing index, so we jump if possible.
* (this happens when going from big to small table). */
if (i >= d->ht[1].size) i = d->rehashidx;
if (i >= d->ht[1].size)
i = d->rehashidx;
else
continue;
}
if (i >= d->ht[j].size) continue; /* Out of range for this table. */