]> git.saurik.com Git - redis.git/blobdiff - src/ziplist.c
Also force SIGSEGV without HAVE_BACKTRACE
[redis.git] / src / ziplist.c
index 95103dc076c9c9b61a5ea8b6675029b1d4f0942a..4ecd1885d6217f5416ec4ff0de85dcb6232c09f8 100644 (file)
@@ -69,7 +69,7 @@
 #include "zmalloc.h"
 #include "util.h"
 #include "ziplist.h"
-#include "endian.h"
+#include "endianconv.h"
 
 #define ZIP_END 255
 #define ZIP_BIGLEN 254
@@ -304,7 +304,7 @@ static int64_t zipLoadInteger(unsigned char *p, unsigned char encoding) {
         ret = i16;
     } else if (encoding == ZIP_INT_32B) {
         memcpy(&i32,p,sizeof(i32));
-        memrev16ifbe(&i32);
+        memrev32ifbe(&i32);
         ret = i32;
     } else if (encoding == ZIP_INT_64B) {
         memcpy(&i64,p,sizeof(i64));
@@ -465,7 +465,7 @@ static unsigned char *__ziplistDelete(unsigned char *zl, unsigned char *p, unsig
              * size of prevlen doesn't have an effect on the *tail* offset. */
             tail = zipEntry(p);
             if (p[tail.headersize+tail.len] != ZIP_END) {
-                ZIPLIST_TAIL_OFFSET(zl) +=
+                ZIPLIST_TAIL_OFFSET(zl) =
                    intrev32ifbe(intrev32ifbe(ZIPLIST_TAIL_OFFSET(zl))+nextdiff);
             }