Merge pull request #2468 from taosdata/hotfix/sangshuduo/fix-taosdemo-error-divide-zero

fix divide-zero error in taosdemo
This commit is contained in:
Shengliang Guan 2020-06-28 14:42:08 +08:00 committed by GitHub
commit 3472813bc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -547,7 +547,10 @@ int main(int argc, char *argv[]) {
threads = ntables;
a = 1;
}
int b = ntables % threads;
int b = 0;
if (threads != 0)
b = ntables % threads;
int last = 0;
for (int i = 0; i < threads; i++) {
info *t_info = infos + i;