From ab1e87f5b1eddbe3c556b8f2529757f869690436 Mon Sep 17 00:00:00 2001 From: varianfeng Date: Tue, 26 Feb 2019 10:33:53 +0800 Subject: [PATCH] fix corrupt_rdb.c bug.Let the name of input rdb file name be valid. --- utils/corrupt_rdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/corrupt_rdb.c b/utils/corrupt_rdb.c index 7ba9caeee..df9c93ed8 100644 --- a/utils/corrupt_rdb.c +++ b/utils/corrupt_rdb.c @@ -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);