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

This commit is contained in:
varianfeng 2019-02-26 10:33:53 +08:00 committed by antirez
parent b19e8b9a2c
commit ab1e87f5b1

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);