summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorvarianfeng <varianfeng@tencent.com>2019-02-26 10:33:53 +0800
committerantirez <antirez@gmail.com>2019-03-01 17:46:42 +0100
commitab1e87f5b1eddbe3c556b8f2529757f869690436 (patch)
tree8aa38aed3aa8590a8f228c306af3635ada212fd3 /utils
parentb19e8b9a2c84694cd2586983a260ae6dc36afc86 (diff)
downloadredis-ab1e87f5b1eddbe3c556b8f2529757f869690436.tar.gz
fix corrupt_rdb.c bug.Let the name of input rdb file name be valid.
Diffstat (limited to 'utils')
-rw-r--r--utils/corrupt_rdb.c3
1 files changed, 2 insertions, 1 deletions
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);