From 2d614817ed261b55eb4b9277d010900789e79398 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 19 Oct 2021 22:12:22 +0800 Subject: [PATCH] Hotfix/sangshuduo/td 3197 taosdemo coverity scan for master (#8324) * [TD-3197]: taosdemo and taosdump coverity scan issues. * exit if read sample file failed. * fix converity scan issue. * fix coverity scan issue. * fix coverity scan memory leak. * fix resource leak reported by coverity scan. * fix taosdemo coverity scan issue. * fix tcsetattr and getchar return value determination bug. * fix coverity scan issue. * fix two more coverity scan issues. * fix stmt batch coverity scan issue. * change to portable format. * fix coverity scan issue Co-authored-by: Shuduo Sang --- src/kit/taosdemo/taosdemo.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 060f856afe..8fb0fefa13 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -1886,12 +1886,6 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) { arguments->disorderRatio, 50); arguments->disorderRatio = 50; } - - if (arguments->disorderRatio < 0) { - errorPrint("Invalid disorder ratio %d, will be set to %d\n", - arguments->disorderRatio, 0); - arguments->disorderRatio = 0; - } } else if ((0 == strncmp(argv[i], "-a", strlen("-a"))) || (0 == strncmp(argv[i], "--replica", strlen("--replica")))) { -- GitLab