mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Aesthetic changes to #4068 PR to conform to Redis coding standard.
1. Inline if ... statement if short. 2. No lines over 80 columns.
This commit is contained in:
parent
6476f1a979
commit
8b768e8ea4
13
src/aof.c
13
src/aof.c
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user