]> git.saurik.com Git - redis.git/blobdiff - src/sort.c
Use specialized function to add multi bulk reply length
[redis.git] / src / sort.c
index aa1ce929399dc64bfdbcccda95f1db3ae1b2c9c6..f53ad4865b0cffb6b52705fecdf544e849b414ee 100644 (file)
@@ -307,7 +307,7 @@ void sortCommand(redisClient *c) {
     outputlen = getop ? getop*(end-start+1) : end-start+1;
     if (storekey == NULL) {
         /* STORE option not specified, sent the sorting result to client */
-        addReplySds(c,sdscatprintf(sdsempty(),"*%d\r\n",outputlen));
+        addReplyMultiBulkLen(c,outputlen);
         for (j = start; j <= end; j++) {
             listNode *ln;
             listIter li;