Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
4fc20992
Unverified
Commit
4fc20992
authored
Jul 17, 2018
by
Salvatore Sanfilippo
Committed by
GitHub
Jul 17, 2018
Browse files
Merge pull request #5128 from kingpeterpaule/remove-one-loop-in-freeMemoryIfNeeded
remove ineffective loop in dictGetSomeKeys.
parents
9fbd49bb
b6ce7d5d
Changes
1
Show whitespace changes
Inline
Side-by-side
src/dict.c
View file @
4fc20992
...
@@ -705,7 +705,9 @@ unsigned int dictGetSomeKeys(dict *d, dictEntry **des, unsigned int count) {
...
@@ -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
* 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
)
i
=
d
->
rehashidx
;
else
continue
;
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. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment