]> git.saurik.com Git - redis.git/commitdiff
minor code aesthetic change
authorantirez <antirez@gmail.com>
Fri, 10 Jun 2011 16:13:57 +0000 (18:13 +0200)
committerantirez <antirez@gmail.com>
Fri, 10 Jun 2011 16:13:57 +0000 (18:13 +0200)
src/rdb.c

index d9dac659c4b14d73680974865b86b3201d2dc5e2..a2471aef63da2a78efe830574a2f4fdf30c8fce4 100644 (file)
--- a/src/rdb.c
+++ b/src/rdb.c
@@ -1038,12 +1038,9 @@ void saveCommand(redisClient *c) {
 void bgsaveCommand(redisClient *c) {
     if (server.bgsavechildpid != -1 || server.bgsavethread != (pthread_t)-1) {
         addReplyError(c,"Background save already in progress");
-        return;
     } else if (server.bgrewritechildpid != -1) {
         addReplyError(c,"Can't BGSAVE while AOF log rewriting is in progress");
-        return;
-    }
-    if (rdbSaveBackground(server.dbfilename) == REDIS_OK) {
+    } else if (rdbSaveBackground(server.dbfilename) == REDIS_OK) {
         addReplyStatus(c,"Background saving started");
     } else {
         addReply(c,shared.err);