slove some static check questions for http modules
This commit is contained in:
parent
cf014abd96
commit
966623a692
|
@ -119,7 +119,7 @@ bool gcBuildQueryJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result,
|
||||||
cmd->numOfRows += numOfRows;
|
cmd->numOfRows += numOfRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < numOfRows; ++i) {
|
for (int k = 0; k < numOfRows; ++k) {
|
||||||
TAOS_ROW row = taos_fetch_row(result);
|
TAOS_ROW row = taos_fetch_row(result);
|
||||||
|
|
||||||
// for group by
|
// for group by
|
||||||
|
|
|
@ -94,7 +94,7 @@ bool restBuildSqlJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result,
|
||||||
int num_fields = taos_num_fields(result);
|
int num_fields = taos_num_fields(result);
|
||||||
TAOS_FIELD *fields = taos_fetch_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);
|
TAOS_ROW row = taos_fetch_row(result);
|
||||||
|
|
||||||
// data row array begin
|
// data row array begin
|
||||||
|
|
|
@ -262,6 +262,8 @@ int tgReadSchema(const char *fileName) {
|
||||||
size_t result = fread(content, 1, contentSize, fp);
|
size_t result = fread(content, 1, contentSize, fp);
|
||||||
if (result != contentSize) {
|
if (result != contentSize) {
|
||||||
httpError("failed to read telegraf schema file:%s", fileName);
|
httpError("failed to read telegraf schema file:%s", fileName);
|
||||||
|
fclose(fp);
|
||||||
|
free(content);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue