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
ab1e87f5
Commit
ab1e87f5
authored
Feb 26, 2019
by
varianfeng
Committed by
antirez
Mar 01, 2019
Browse files
fix corrupt_rdb.c bug.Let the name of input rdb file name be valid.
parent
b19e8b9a
Changes
1
Show whitespace changes
Inline
Side-by-side
utils/corrupt_rdb.c
View file @
ab1e87f5
...
@@ -21,8 +21,9 @@ int main(int argc, char **argv) {
...
@@ -21,8 +21,9 @@ int main(int argc, char **argv) {
}
}
srand
(
time
(
NULL
));
srand
(
time
(
NULL
));
char
*
filename
=
argv
[
1
];
cycles
=
atoi
(
argv
[
2
]);
cycles
=
atoi
(
argv
[
2
]);
fd
=
open
(
"dump.rdb"
,
O_RDWR
);
fd
=
open
(
filename
,
O_RDWR
);
if
(
fd
==
-
1
)
{
if
(
fd
==
-
1
)
{
perror
(
"open"
);
perror
(
"open"
);
exit
(
1
);
exit
(
1
);
...
...
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