summaryrefslogtreecommitdiff
path: root/src/cluster.c
diff options
context:
space:
mode:
authorMatt Stancliff <matt@genges.com>2014-11-16 13:03:54 -0500
committerMatt Stancliff <matt@genges.com>2014-12-23 09:31:02 -0500
commitad41a7c40430bc043c2b95556197af2862a2bab5 (patch)
treef26884f4c15e432954d7432123aee045fcc5d599 /src/cluster.c
parent9e718a1f57a18d685fc63cff9ffdeef3af734969 (diff)
downloadredis-ad41a7c40430bc043c2b95556197af2862a2bab5.tar.gz
Add addReplyBulkSds() function
Refactor a common pattern into one function so we don't end up with copy/paste programming.
Diffstat (limited to 'src/cluster.c')
-rw-r--r--src/cluster.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cluster.c b/src/cluster.c
index 6fc028627..a308fc507 100644
--- a/src/cluster.c
+++ b/src/cluster.c
@@ -3886,10 +3886,7 @@ void clusterCommand(redisClient *c) {
server.cluster->stats_bus_messages_sent,
server.cluster->stats_bus_messages_received
);
- addReplySds(c,sdscatprintf(sdsempty(),"$%lu\r\n",
- (unsigned long)sdslen(info)));
- addReplySds(c,info);
- addReply(c,shared.crlf);
+ addReplyBulkSds(c, info);
} else if (!strcasecmp(c->argv[1]->ptr,"saveconfig") && c->argc == 2) {
int retval = clusterSaveConfig(1);