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
24882e31
Commit
24882e31
authored
Jul 06, 2016
by
antirez
Browse files
Fix redis_check_rdb() return value.
parent
1e6bb9ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-check-rdb.c
View file @
24882e31
...
@@ -172,7 +172,8 @@ void rdbCheckSetupSignals(void) {
...
@@ -172,7 +172,8 @@ void rdbCheckSetupSignals(void) {
sigaction
(
SIGILL
,
&
act
,
NULL
);
sigaction
(
SIGILL
,
&
act
,
NULL
);
}
}
/* Check the specified RDB file. */
/* Check the specified RDB file. Return 0 if the RDB looks sane, otherwise
* 1 is returned. */
int
redis_check_rdb
(
char
*
rdbfilename
)
{
int
redis_check_rdb
(
char
*
rdbfilename
)
{
uint64_t
dbid
;
uint64_t
dbid
;
int
type
,
rdbver
;
int
type
,
rdbver
;
...
@@ -181,7 +182,7 @@ int redis_check_rdb(char *rdbfilename) {
...
@@ -181,7 +182,7 @@ int redis_check_rdb(char *rdbfilename) {
FILE
*
fp
;
FILE
*
fp
;
rio
rdb
;
rio
rdb
;
if
((
fp
=
fopen
(
rdbfilename
,
"r"
))
==
NULL
)
return
C_ERR
;
if
((
fp
=
fopen
(
rdbfilename
,
"r"
))
==
NULL
)
return
1
;
rioInitWithFile
(
&
rdb
,
fp
);
rioInitWithFile
(
&
rdb
,
fp
);
rdbstate
.
rio
=
&
rdb
;
rdbstate
.
rio
=
&
rdb
;
...
...
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