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
1240552d
Commit
1240552d
authored
Jun 11, 2010
by
Pieter Noordhuis
Browse files
always iterate from head to tail on LINSERT
parent
279d7e67
Changes
1
Show whitespace changes
Inline
Side-by-side
redis.c
View file @
1240552d
...
@@ -5218,11 +5218,7 @@ static void pushxGenericCommand(redisClient *c, int where, robj *old_obj, robj *
...
@@ -5218,11 +5218,7 @@ static void pushxGenericCommand(redisClient *c, int where, robj *old_obj, robj *
}
}
if
(
old_obj
!=
NULL
)
{
if
(
old_obj
!=
NULL
)
{
if
(
where
==
REDIS_TAIL
)
{
iter
=
listTypeInitIterator
(
subject
,
0
,
REDIS_TAIL
);
iter
=
listTypeInitIterator
(
subject
,
0
,
REDIS_TAIL
);
}
else
{
iter
=
listTypeInitIterator
(
subject
,
-
1
,
REDIS_HEAD
);
}
while
(
listTypeNext
(
iter
,
&
entry
))
{
while
(
listTypeNext
(
iter
,
&
entry
))
{
if
(
listTypeEqual
(
&
entry
,
old_obj
))
{
if
(
listTypeEqual
(
&
entry
,
old_obj
))
{
listTypeInsert
(
subject
,
&
entry
,
new_obj
,
where
);
listTypeInsert
(
subject
,
&
entry
,
new_obj
,
where
);
...
...
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