fix comments in listpack.c

(cherry picked from commit 71fafd761ad5f939f485259eb3856ed3766c98be)
This commit is contained in:
chenhui0212 2020-06-16 17:50:38 +08:00 committed by Oran Agra
parent 0ebbc36059
commit 88e1f80eee

View File

@ -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;
/* Left to right scanning always expects a negative index. Convert
/* Right to left 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 left-to-right. */
* want to always scan right-to-left. */
if (index < 0) forward = 0;
}