diff options
author | wutao_water <253041022@qq.com> | 2022-05-02 17:46:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-02 12:46:48 +0300 |
commit | 9c39256a28eff24e16ca373a02729e775e37d05a (patch) | |
tree | 875878e5c75f66d5a71fa3758bc9cccbcc543eda | |
parent | ef68deb3c2a4d6205ddc84141d4d84b6e53cbc1b (diff) | |
download | redis-9c39256a28eff24e16ca373a02729e775e37d05a.tar.gz |
cleanup: use ZIPLIST_ENTRY_END macro instead of 1 (#3672)
update macros ZIPLIST_ENTRY_END i think the right definition is ((zl)+intrev32ifbe(ZIPLIST_BYTES(zl))-ZIPLIST_END_SIZE)
-rw-r--r-- | src/ziplist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ziplist.c b/src/ziplist.c index fa73cbf6f..36556050c 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -255,7 +255,7 @@ /* Return the pointer to the last byte of a ziplist, which is, the * end of ziplist FF entry. */ -#define ZIPLIST_ENTRY_END(zl) ((zl)+intrev32ifbe(ZIPLIST_BYTES(zl))-1) +#define ZIPLIST_ENTRY_END(zl) ((zl)+intrev32ifbe(ZIPLIST_BYTES(zl))-ZIPLIST_END_SIZE) /* Increment the number of items field in the ziplist header. Note that this * macro should never overflow the unsigned 16 bit integer, since entries are |