diff options
author | Oran Agra <oran@redislabs.com> | 2020-10-20 09:12:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-20 09:12:24 +0300 |
commit | a425e1d26df02ac5ce0fc9a0c679b99d72550009 (patch) | |
tree | 50c57884d5cce36a83f372b2fc5f9852e9110408 /src/listpack.c | |
parent | 04a0af9085ed91eace8af94f71a07b651a1af454 (diff) | |
download | redis-a425e1d26df02ac5ce0fc9a0c679b99d72550009.tar.gz |
fix 32bit build warnings (#7926)
Diffstat (limited to 'src/listpack.c')
-rw-r--r-- | src/listpack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/listpack.c b/src/listpack.c index 7e2da9b74..f8c34429e 100644 --- a/src/listpack.c +++ b/src/listpack.c @@ -768,10 +768,10 @@ unsigned char *lpSeek(unsigned char *lp, long index) { if (numele != LP_HDR_NUMELE_UNKNOWN) { if (index < 0) index = (long)numele+index; if (index < 0) return NULL; /* Index still < 0 means out of range. */ - if ((long)index >= numele) return NULL; /* Out of range the other side. */ + if (index >= (long)numele) return NULL; /* Out of range the other side. */ /* We want to scan right-to-left if the element we are looking for * is past the half of the listpack. */ - if ((long)index > numele/2) { + if (index > (long)numele/2) { forward = 0; /* Right to left scanning always expects a negative index. Convert * our index to negative form. */ |