]> git.saurik.com Git - redis.git/blobdiff - src/ziplist.c
Merge remote-tracking branch 'origin/unstable' into unstable
[redis.git] / src / ziplist.c
index 95103dc076c9c9b61a5ea8b6675029b1d4f0942a..113e71d9ec136e64d9b7a0940b5b5268d1f90dcb 100644 (file)
@@ -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));
         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));
         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) {
              * 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);
             }
 
                    intrev32ifbe(intrev32ifbe(ZIPLIST_TAIL_OFFSET(zl))+nextdiff);
             }