slove some static check questions for http modules

This commit is contained in:
fang 2019-12-09 13:29:34 +08:00
parent cf014abd96
commit 966623a692
3 changed files with 4 additions and 2 deletions

View File

@ -119,7 +119,7 @@ bool gcBuildQueryJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result,
cmd->numOfRows += numOfRows;
}
for (int i = 0; i < numOfRows; ++i) {
for (int k = 0; k < numOfRows; ++k) {
TAOS_ROW row = taos_fetch_row(result);
// for group by

View File

@ -94,7 +94,7 @@ bool restBuildSqlJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result,
int num_fields = taos_num_fields(result);
TAOS_FIELD *fields = taos_fetch_fields(result);
for (int i = 0; i < numOfRows; ++i) {
for (int k = 0; k < numOfRows; ++k) {
TAOS_ROW row = taos_fetch_row(result);
// data row array begin

View File

@ -262,6 +262,8 @@ int tgReadSchema(const char *fileName) {
size_t result = fread(content, 1, contentSize, fp);
if (result != contentSize) {
httpError("failed to read telegraf schema file:%s", fileName);
fclose(fp);
free(content);
return -1;
}