diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 899bed3b46a88314c5688c54e28e17aec1f37246..3e802c956683d6edce4c7be97afb61fec95d0a6e 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -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;