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
d593c488
Commit
d593c488
authored
May 29, 2010
by
Pieter Noordhuis
Browse files
modify compare function to check if the encoding is equal before comparing
parent
a5456b2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
ziplist.c
View file @
d593c488
...
@@ -461,12 +461,12 @@ unsigned int ziplistCompare(unsigned char *p, unsigned char *s, unsigned int sle
...
@@ -461,12 +461,12 @@ unsigned int ziplistCompare(unsigned char *p, unsigned char *s, unsigned int sle
return
0
;
return
0
;
}
}
}
else
{
}
else
{
/* Try to compare encoded values */
if
(
zipTryEncoding
(
s
,
&
sval
,
&
sencoding
))
{
if
(
zipTryEncoding
(
s
,
&
sval
,
&
sencoding
))
{
/* Do integer compare */
if
(
entry
.
encoding
==
sencoding
)
{
val
=
zipLoadInteger
(
p
+
entry
.
headersize
,
entry
.
encoding
);
val
=
zipLoadInteger
(
p
+
entry
.
headersize
,
entry
.
encoding
);
return
val
==
sval
;
return
val
==
sval
;
}
else
{
}
/* Ziplist entry is integer encoded, but given entry is not. */
}
}
}
}
return
0
;
return
0
;
...
...
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