Add addReplyBulkSds() function

Refactor a common pattern into one function so we don't
end up with copy/paste programming.
This commit is contained in:
Matt Stancliff
2014-11-16 13:03:54 -05:00
parent 9e718a1f57
commit ad41a7c404
5 changed files with 12 additions and 13 deletions

View File

@ -2908,10 +2908,7 @@ void sentinelInfoCommand(redisClient *c) {
dictReleaseIterator(di);
}
addReplySds(c,sdscatprintf(sdsempty(),"$%lu\r\n",
(unsigned long)sdslen(info)));
addReplySds(c,info);
addReply(c,shared.crlf);
addReplyBulkSds(c, info);
}
/* Implements Sentinel verison of the ROLE command. The output is