summaryrefslogtreecommitdiff
path: root/src/ziplist.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-02-08 23:20:39 +0100
committerantirez <antirez@gmail.com>2012-02-08 23:20:39 +0100
commit8e0ef249a2c1a67e11838ff48329b51c4aa7ccdc (patch)
treed8f42beead754fe757b5a93e0c427ce59a7a3bb2 /src/ziplist.c
parent56538477143b144f2267ce98805a7b6edc763528 (diff)
downloadredis-8e0ef249a2c1a67e11838ff48329b51c4aa7ccdc.tar.gz
more ziplist.c endianess fixes
Diffstat (limited to 'src/ziplist.c')
-rw-r--r--src/ziplist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ziplist.c b/src/ziplist.c
index c8fd64ac3..f2ce933ff 100644
--- a/src/ziplist.c
+++ b/src/ziplist.c
@@ -92,8 +92,8 @@
#define ZIPLIST_LENGTH(zl) (*((uint16_t*)((zl)+sizeof(uint32_t)*2)))
#define ZIPLIST_HEADER_SIZE (sizeof(uint32_t)*2+sizeof(uint16_t))
#define ZIPLIST_ENTRY_HEAD(zl) ((zl)+ZIPLIST_HEADER_SIZE)
-#define ZIPLIST_ENTRY_TAIL(zl) ((zl)+ZIPLIST_TAIL_OFFSET(zl))
-#define ZIPLIST_ENTRY_END(zl) ((zl)+ZIPLIST_BYTES(zl)-1)
+#define ZIPLIST_ENTRY_TAIL(zl) ((zl)+intrev32ifbe(ZIPLIST_TAIL_OFFSET(zl)))
+#define ZIPLIST_ENTRY_END(zl) ((zl)+intrev32ifbe(ZIPLIST_BYTES(zl))-1)
/* We know a positive increment can only be 1 because entries can only be
* pushed one at a time. */