Use specialized function to add multi bulk reply length

This commit is contained in:
Pieter Noordhuis
2010-09-02 12:38:34 +02:00
parent 57b0738011
commit 0537e7bf80
9 changed files with 14 additions and 10 deletions

View 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;