]> git.saurik.com Git - redis.git/blobdiff - src/t_set.c
Changed reply buildup internals
[redis.git] / src / t_set.c
index d6041e72489f24c68f7ce50354706f0c4de0473b..e2ac5ae5378155f329f76d90d7f5c6680e959f05 100644 (file)
@@ -276,7 +276,7 @@ void scardCommand(redisClient *c) {
     if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL ||
         checkType(c,o,REDIS_SET)) return;
 
-    addReplyUlong(c,setTypeSize(o));
+    addReplyLongLong(c,setTypeSize(o));
 }
 
 void spopCommand(redisClient *c) {
@@ -469,7 +469,7 @@ void sunionDiffGenericCommand(redisClient *c, robj **setkeys, int setnum, robj *
 
     /* Output the content of the resulting set, if not in STORE mode */
     if (!dstkey) {
-        addReplySds(c,sdscatprintf(sdsempty(),"*%d\r\n",cardinality));
+        addReplyMultiBulkLen(c,cardinality);
         si = setTypeInitIterator(dstset);
         while((ele = setTypeNext(si)) != NULL) {
             addReplyBulk(c,ele);