Commit 0dfc71bd authored by Rob Snyder's avatar Rob Snyder Committed by Oran Agra
Browse files

Fix ziplist length updates on bigendian platforms (#2080)

Adds call to intrev16ifbe to ensure ZIPLIST_LENGTH is compared correctly

(cherry picked from commit eaa52719)
parent 265341b5
...@@ -261,7 +261,7 @@ ...@@ -261,7 +261,7 @@
* to stay there to signal that a full scan is needed to get the number of * to stay there to signal that a full scan is needed to get the number of
* items inside the ziplist. */ * items inside the ziplist. */
#define ZIPLIST_INCR_LENGTH(zl,incr) { \ #define ZIPLIST_INCR_LENGTH(zl,incr) { \
if (ZIPLIST_LENGTH(zl) < UINT16_MAX) \ if (intrev16ifbe(ZIPLIST_LENGTH(zl)) < UINT16_MAX) \
ZIPLIST_LENGTH(zl) = intrev16ifbe(intrev16ifbe(ZIPLIST_LENGTH(zl))+incr); \ ZIPLIST_LENGTH(zl) = intrev16ifbe(intrev16ifbe(ZIPLIST_LENGTH(zl))+incr); \
} }
......
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