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

fix: demoapi.c coverity scan issues (#17350)

上级 2f69d657
......@@ -74,7 +74,12 @@ static void prepare_data(TAOS* taos) {
res = taos_query(taos, "create database test;");
taos_free_result(res);
taosMsleep(100);
taos_select_db(taos, "test");
if (taos_select_db(taos, "test")) {
errorPrint("%s() LN%d: error no: %d, reason: %s\n",
__func__, __LINE__, taos_errno(res), taos_errstr(res));
taos_free_result(res);
return;
}
char command[1024] = {0};
sprintf(command, "%s", "create table meters(ts timestamp, f float, n int, bin1 binary(20), c nchar(20), bin2 binary(20)) tags(area int, city binary(20), dist nchar(20), street binary(20));");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册