summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhaozhao.zz <zhaozhao.zz@alibaba-inc.com>2017-12-21 14:55:27 +0800
committerantirez <antirez@gmail.com>2018-01-15 13:01:03 +0100
commit1b8eec3e53b1bf0648084747df87bcd73f26029c (patch)
tree8de79febc998b1a2292ec895f58d2c9d84344600
parentc45366be0a08e6777b63150198ddfe9119be9132 (diff)
downloadredis-1b8eec3e53b1bf0648084747df87bcd73f26029c.tar.gz
aof: format code and comment
-rw-r--r--src/aof.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/aof.c b/src/aof.c
index f172d3050..146e27c3a 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -1348,7 +1348,7 @@ int aofCreatePipes(void) {
if (pipe(fds) == -1) goto error; /* parent -> children data. */
if (pipe(fds+2) == -1) goto error; /* children -> parent ack. */
- if (pipe(fds+4) == -1) goto error; /* children -> parent ack. */
+ if (pipe(fds+4) == -1) goto error; /* parent -> children ack. */
/* Parent -> children data is non blocking. */
if (anetNonBlock(NULL,fds[0]) != ANET_OK) goto error;
if (anetNonBlock(NULL,fds[1]) != ANET_OK) goto error;
@@ -1562,10 +1562,10 @@ void backgroundRewriteDoneHandler(int exitcode, int bysignal) {
if (server.aof_fd == -1) {
/* AOF disabled */
- /* Don't care if this fails: oldfd will be -1 and we handle that.
- * One notable case of -1 return is if the old file does
- * not exist. */
- oldfd = open(server.aof_filename,O_RDONLY|O_NONBLOCK);
+ /* Don't care if this fails: oldfd will be -1 and we handle that.
+ * One notable case of -1 return is if the old file does
+ * not exist. */
+ oldfd = open(server.aof_filename,O_RDONLY|O_NONBLOCK);
} else {
/* AOF enabled */
oldfd = -1; /* We'll set this to the current AOF filedes later. */