fix corrupt_rdb.c bug.Let the name of input rdb file name be valid.

This commit is contained in:
varianfeng authored and antirez committed 2019-03-01 17:46:42 +01:00
1 parent b19e8b9a2c
commit ab1e87f5b1
1 file changed
+2 -1
+2 -1
View File
@@ -21,8 +21,9 @@ int main(int argc, char **argv) {
}
srand(time(NULL));
char *filename = argv[1];
cycles = atoi(argv[2]);
fd = open("dump.rdb",O_RDWR);
fd = open(filename,O_RDWR);
if (fd == -1) {
perror("open");
exit(1);