]> git.saurik.com Git - redis.git/blobdiff - src/rdb.c
addReplyLongLong optimized to return shared objects when the value to reply is 0...
[redis.git] / src / rdb.c
index d186a9c5445e13e7e2f957d93ca78bc47dbfb12d..2557f5b8dd193dae3e6f5c3aff665d74f098fcd9 100644 (file)
--- a/src/rdb.c
+++ b/src/rdb.c
@@ -308,7 +308,7 @@ int rdbSaveObject(FILE *fp, robj *o) {
 
             if ((n = rdbSaveRawString(fp,o->ptr,l)) == -1) return -1;
             nwritten += n;
-        } else if (o->encoding == REDIS_ENCODING_RAW) {
+        } else if (o->encoding == REDIS_ENCODING_SKIPLIST) {
             zset *zs = o->ptr;
             dictIterator *di = dictGetIterator(zs->dict);
             dictEntry *de;
@@ -875,10 +875,10 @@ robj *rdbLoadObject(int type, FILE *fp) {
                 o->type = REDIS_ZSET;
                 o->encoding = REDIS_ENCODING_ZIPLIST;
                 if (zsetLength(o) > server.zset_max_ziplist_entries)
-                    zsetConvert(o,REDIS_ENCODING_RAW);
+                    zsetConvert(o,REDIS_ENCODING_SKIPLIST);
                 break;
             default:
-                redisPanic("Unknown enoding");
+                redisPanic("Unknown encoding");
                 break;
         }
     } else {