Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d067e334
Commit
d067e334
authored
Jun 22, 2017
by
antirez
Browse files
Aesthetic changes to #4068 PR to conform to Redis coding standard.
1. Inline if ... statement if short. 2. No lines over 80 columns.
parent
2b0f03e4
Changes
1
Show whitespace changes
Inline
Side-by-side
src/aof.c
View file @
d067e334
...
@@ -542,17 +542,16 @@ void feedAppendOnlyFile(struct redisCommand *cmd, int dictid, robj **argv, int a
...
@@ -542,17 +542,16 @@ void feedAppendOnlyFile(struct redisCommand *cmd, int dictid, robj **argv, int a
/* Translate SET [EX seconds][PX milliseconds] to SET and PEXPIREAT */
/* Translate SET [EX seconds][PX milliseconds] to SET and PEXPIREAT */
buf = catAppendOnlyGenericCommand(buf,3,argv);
buf = catAppendOnlyGenericCommand(buf,3,argv);
for (i = 3; i < argc; i ++) {
for (i = 3; i < argc; i ++) {
if
(
!
strcasecmp
(
argv
[
i
]
->
ptr
,
"ex"
))
if (!strcasecmp(argv[i]->ptr, "ex")) exarg = argv[i+1];
exarg
=
argv
[
i
+
1
];
if (!strcasecmp(argv[i]->ptr, "px")) pxarg = argv[i+1];
if
(
!
strcasecmp
(
argv
[
i
]
->
ptr
,
"px"
))
pxarg
=
argv
[
i
+
1
];
}
}
serverAssert(!(exarg && pxarg));
serverAssert(!(exarg && pxarg));
if (exarg)
if (exarg)
buf
=
catAppendOnlyExpireAtCommand
(
buf
,
server
.
expireCommand
,
argv
[
1
],
exarg
);
buf = catAppendOnlyExpireAtCommand(buf,server.expireCommand,argv[1],
exarg);
if (pxarg)
if (pxarg)
buf
=
catAppendOnlyExpireAtCommand
(
buf
,
server
.
pexpireCommand
,
argv
[
1
],
pxarg
);
buf = catAppendOnlyExpireAtCommand(buf,server.pexpireCommand,argv[1],
pxarg);
} else {
} else {
/* All the other commands don't need translation or need the
/* All the other commands don't need translation or need the
* same translation already operated in the command vector
* same translation already operated in the command vector
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment