Unverified Commit 9c39256a authored by wutao_water's avatar wutao_water Committed by GitHub
Browse files

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)
parent ef68deb3
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
/* Return the pointer to the last byte of a ziplist, which is, the /* Return the pointer to the last byte of a ziplist, which is, the
* end of ziplist FF entry. */ * 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 /* 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 * macro should never overflow the unsigned 16 bit integer, since entries are
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment