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
bd7ddd79
Unverified
Commit
bd7ddd79
authored
Mar 01, 2019
by
Salvatore Sanfilippo
Committed by
GitHub
Mar 01, 2019
Browse files
Merge pull request #5870 from fengweiyuan/5.0
fix corrupt_rdb.c bug.Let the name of input rdb file name be valid.
parents
44c5bce0
d13bc143
Changes
1
Show whitespace changes
Inline
Side-by-side
utils/corrupt_rdb.c
View file @
bd7ddd79
...
@@ -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