]> git.saurik.com Git - redis.git/blobdiff - src/aof.c
Use specialized function to add status and error replies
[redis.git] / src / aof.c
index 58dd5538f08fb33560d52c9eb87acf23bf73a4f5..b639eb5258688eba5c7ff6f1406a1dc60cc3a6c9 100644 (file)
--- a/src/aof.c
+++ b/src/aof.c
@@ -632,12 +632,11 @@ int rewriteAppendOnlyFileBackground(void) {
 
 void bgrewriteaofCommand(redisClient *c) {
     if (server.bgrewritechildpid != -1) {
-        addReplySds(c,sdsnew("-ERR background append only file rewriting already in progress\r\n"));
+        addReplyError(c,"Background append only file rewriting already in progress");
         return;
     }
     if (rewriteAppendOnlyFileBackground() == REDIS_OK) {
-        char *status = "+Background append only file rewriting started\r\n";
-        addReplySds(c,sdsnew(status));
+        addReplyStatus(c,"Background append only file rewriting started");
     } else {
         addReply(c,shared.err);
     }