未验证 提交 6262dffb 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

[TD-3914]<fix>: taosdemo input argument validation. (#6097)

Co-authored-by: NShuduo Sang <sdsang@taosdata.com>
上级 930cd267
......@@ -725,7 +725,6 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
exit(EXIT_FAILURE);
}
tstrncpy(configDir, argv[++i], TSDB_FILENAME_LEN);
} else if (strcmp(argv[i], "-h") == 0) {
if (argc == i+1) {
printHelp();
......@@ -849,6 +848,11 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
}
arguments->num_of_CPR = atoi(argv[++i]);
} else if (strcmp(argv[i], "-b") == 0) {
if (argc == i+1) {
printHelp();
errorPrint("%s", "\n\t-b need valid string following!\n");
exit(EXIT_FAILURE);
}
sptr = arguments->datatype;
++i;
if (strstr(argv[i], ",") == NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册