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
dda20542
Commit
dda20542
authored
Jun 04, 2010
by
Pieter Noordhuis
Browse files
safety assert in listTypeNext
parent
003f0840
Changes
1
Show whitespace changes
Inline
Side-by-side
redis.c
View file @
dda20542
...
@@ -5029,6 +5029,9 @@ static void listTypeReleaseIterator(listTypeIterator *li) {
...
@@ -5029,6 +5029,9 @@ static void listTypeReleaseIterator(listTypeIterator *li) {
* and advances the position of the iterator. Returns 1 when the current
* and advances the position of the iterator. Returns 1 when the current
* entry is in fact an entry, 0 otherwise. */
* entry is in fact an entry, 0 otherwise. */
static
int
listTypeNext
(
listTypeIterator
*
li
,
listTypeEntry
*
entry
)
{
static
int
listTypeNext
(
listTypeIterator
*
li
,
listTypeEntry
*
entry
)
{
/* Protect from converting when iterating */
redisAssert
(
li
->
subject
->
encoding
==
li
->
encoding
);
entry
->
li
=
li
;
entry
->
li
=
li
;
if
(
li
->
encoding
==
REDIS_ENCODING_ZIPLIST
)
{
if
(
li
->
encoding
==
REDIS_ENCODING_ZIPLIST
)
{
entry
->
zi
=
li
->
zi
;
entry
->
zi
=
li
->
zi
;
...
...
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