Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
57c98d27
Commit
57c98d27
authored
Mar 21, 2023
by
Vitaly Arbuzov
Browse files
Remove whitespace formatting from aof.c
parent
297922e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/aof.c
View file @
57c98d27
...
@@ -2266,30 +2266,30 @@ int rewriteAppendOnlyFileRio(rio *aof) {
...
@@ -2266,30 +2266,30 @@ int rewriteAppendOnlyFileRio(rio *aof) {
keystr
=
dictGetKey
(
de
);
keystr
=
dictGetKey
(
de
);
o
=
dictGetVal
(
de
);
o
=
dictGetVal
(
de
);
initStaticStringObject
(
key
,
keystr
);
initStaticStringObject
(
key
,
keystr
);
expiretime
=
getExpire
(
db
,
&
key
);
expiretime
=
getExpire
(
db
,
&
key
);
/* Save the key and associated value */
/* Save the key and associated value */
if
(
o
->
type
==
OBJ_STRING
)
{
if
(
o
->
type
==
OBJ_STRING
)
{
/* Emit a SET command */
/* Emit a SET command */
char
cmd
[]
=
"*3
\r\n
$3
\r\n
SET
\r\n
"
;
char
cmd
[]
=
"*3
\r\n
$3
\r\n
SET
\r\n
"
;
if
(
rioWrite
(
aof
,
cmd
,
sizeof
(
cmd
)
-
1
)
==
0
)
goto
werr
;
if
(
rioWrite
(
aof
,
cmd
,
sizeof
(
cmd
)
-
1
)
==
0
)
goto
werr
;
/* Key and value */
/* Key and value */
if
(
rioWriteBulkObject
(
aof
,
&
key
)
==
0
)
goto
werr
;
if
(
rioWriteBulkObject
(
aof
,
&
key
)
==
0
)
goto
werr
;
if
(
rioWriteBulkObject
(
aof
,
o
)
==
0
)
goto
werr
;
if
(
rioWriteBulkObject
(
aof
,
o
)
==
0
)
goto
werr
;
}
else
if
(
o
->
type
==
OBJ_LIST
)
{
}
else
if
(
o
->
type
==
OBJ_LIST
)
{
if
(
rewriteListObject
(
aof
,
&
key
,
o
)
==
0
)
goto
werr
;
if
(
rewriteListObject
(
aof
,
&
key
,
o
)
==
0
)
goto
werr
;
}
else
if
(
o
->
type
==
OBJ_SET
)
{
}
else
if
(
o
->
type
==
OBJ_SET
)
{
if
(
rewriteSetObject
(
aof
,
&
key
,
o
)
==
0
)
goto
werr
;
if
(
rewriteSetObject
(
aof
,
&
key
,
o
)
==
0
)
goto
werr
;
}
else
if
(
o
->
type
==
OBJ_ZSET
)
{
}
else
if
(
o
->
type
==
OBJ_ZSET
)
{
if
(
rewriteSortedSetObject
(
aof
,
&
key
,
o
)
==
0
)
goto
werr
;
if
(
rewriteSortedSetObject
(
aof
,
&
key
,
o
)
==
0
)
goto
werr
;
}
else
if
(
o
->
type
==
OBJ_HASH
)
{
}
else
if
(
o
->
type
==
OBJ_HASH
)
{
if
(
rewriteHashObject
(
aof
,
&
key
,
o
)
==
0
)
goto
werr
;
if
(
rewriteHashObject
(
aof
,
&
key
,
o
)
==
0
)
goto
werr
;
}
else
if
(
o
->
type
==
OBJ_STREAM
)
{
}
else
if
(
o
->
type
==
OBJ_STREAM
)
{
if
(
rewriteStreamObject
(
aof
,
&
key
,
o
)
==
0
)
goto
werr
;
if
(
rewriteStreamObject
(
aof
,
&
key
,
o
)
==
0
)
goto
werr
;
}
else
if
(
o
->
type
==
OBJ_MODULE
)
{
}
else
if
(
o
->
type
==
OBJ_MODULE
)
{
if
(
rewriteModuleObject
(
aof
,
&
key
,
o
,
j
)
==
0
)
goto
werr
;
if
(
rewriteModuleObject
(
aof
,
&
key
,
o
,
j
)
==
0
)
goto
werr
;
}
else
{
}
else
{
serverPanic
(
"Unknown object type"
);
serverPanic
(
"Unknown object type"
);
}
}
...
@@ -2302,10 +2302,10 @@ int rewriteAppendOnlyFileRio(rio *aof) {
...
@@ -2302,10 +2302,10 @@ int rewriteAppendOnlyFileRio(rio *aof) {
/* Save the expire time */
/* Save the expire time */
if
(
expiretime
!=
-
1
)
{
if
(
expiretime
!=
-
1
)
{
char
cmd
[]
=
"*3
\r\n
$9
\r\n
PEXPIREAT
\r\n
"
;
char
cmd
[]
=
"*3
\r\n
$9
\r\n
PEXPIREAT
\r\n
"
;
if
(
rioWrite
(
aof
,
cmd
,
sizeof
(
cmd
)
-
1
)
==
0
)
goto
werr
;
if
(
rioWrite
(
aof
,
cmd
,
sizeof
(
cmd
)
-
1
)
==
0
)
goto
werr
;
if
(
rioWriteBulkObject
(
aof
,
&
key
)
==
0
)
goto
werr
;
if
(
rioWriteBulkObject
(
aof
,
&
key
)
==
0
)
goto
werr
;
if
(
rioWriteBulkLongLong
(
aof
,
expiretime
)
==
0
)
goto
werr
;
if
(
rioWriteBulkLongLong
(
aof
,
expiretime
)
==
0
)
goto
werr
;
}
}
/* Update info every 1 second (approximately).
/* Update info every 1 second (approximately).
...
...
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