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

@ -315,7 +315,7 @@ void hmgetCommand(redisClient *c) {
/* Note the check for o != NULL happens inside the loop. This is
* done because objects that cannot be found are considered to be
* an empty hash. The reply should then be a series of NULLs. */
addReplySds(c,sdscatprintf(sdsempty(),"*%d\r\n",c->argc-2));
addReplyMultiBulkLen(c,c->argc-2);
for (i = 2; i < c->argc; i++) {
if (o != NULL && (value = hashTypeGet(o,c->argv[i])) != NULL) {
addReplyBulk(c,value);