Hotfix/sangshuduo/td 3914 taosdemo func param segfault for develop (#6110)
* [TD-3914]<fix>: taosdemo check func param input more. for develop branch. * [TD-3914]<fix>: taosdemo check func param more. for develop branch. * [TD-3914]<fix>: taosdemo input argument validation. (#6097) Co-authored-by: Shuduo Sang <sdsang@taosdata.com> Co-authored-by: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
parent
8f8cf26ced
commit
78c24ae135
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue