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
88e1f80e
Commit
88e1f80e
authored
Jun 16, 2020
by
chenhui0212
Committed by
Oran Agra
Jul 20, 2020
Browse files
fix comments in listpack.c
(cherry picked from commit
71fafd76
)
parent
0ebbc360
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/listpack.c
View file @
88e1f80e
...
...
@@ -773,13 +773,13 @@ unsigned char *lpSeek(unsigned char *lp, long index) {
* is past the half of the listpack. */
if
(
index
>
numele
/
2
)
{
forward
=
0
;
/*
Lef
t to
righ
t scanning always expects a negative index. Convert
/*
Righ
t to
lef
t scanning always expects a negative index. Convert
* our index to negative form. */
index
-=
numele
;
}
}
else
{
/* If the listpack length is unspecified, for negative indexes we
* want to always scan
lef
t-to-
righ
t. */
* want to always scan
righ
t-to-
lef
t. */
if
(
index
<
0
)
forward
=
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