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
3fbf9001
Commit
3fbf9001
authored
May 30, 2010
by
Pieter Noordhuis
Browse files
fix LREM to remove *all* occurances when a zero argument is given
parent
bd8db0ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
3fbf9001
...
...
@@ -5196,12 +5196,12 @@ static void lremCommand(redisClient *c) {
li
=
lInitIterator
(
subject
,
0
);
}
while
(
toremove
&&
lIsEntry
(
li
))
{
while
(
lIsEntry
(
li
))
{
if
(
lEqualTo
(
li
,
obj
))
{
lDelete
(
li
,
direction
);
server
.
dirty
++
;
toremove
--
;
removed
++
;
if
(
toremove
&&
removed
==
toremove
)
break
;
}
else
{
lMove
(
li
,
direction
);
}
...
...
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