refactor errno code
This commit is contained in:
parent
61e2f68542
commit
fa2da69e7c
|
@ -882,11 +882,10 @@ static int32_t sifExecLogic(SLogicConditionNode *node, SIFCtx *ctx, SIFParam *ou
|
||||||
if (ctx->noExec == false) {
|
if (ctx->noExec == false) {
|
||||||
for (int32_t m = 0; m < node->pParameterList->length; m++) {
|
for (int32_t m = 0; m < node->pParameterList->length; m++) {
|
||||||
if (node->condType == LOGIC_COND_TYPE_AND) {
|
if (node->condType == LOGIC_COND_TYPE_AND) {
|
||||||
(void)taosArrayAddAll(output->result, params[m].result);
|
if (taosArrayAddAll(output->result, params[m].result) == NULL) return terrno;
|
||||||
} else if (node->condType == LOGIC_COND_TYPE_OR) {
|
} else if (node->condType == LOGIC_COND_TYPE_OR) {
|
||||||
(void)taosArrayAddAll(output->result, params[m].result);
|
if (taosArrayAddAll(output->result, params[m].result) == NULL) return terrno;
|
||||||
} else if (node->condType == LOGIC_COND_TYPE_NOT) {
|
} else if (node->condType == LOGIC_COND_TYPE_NOT) {
|
||||||
// taosArrayAddAll(output->result, params[m].result);
|
|
||||||
}
|
}
|
||||||
taosArraySort(output->result, uidCompare);
|
taosArraySort(output->result, uidCompare);
|
||||||
taosArrayRemoveDuplicate(output->result, uidCompare, NULL);
|
taosArrayRemoveDuplicate(output->result, uidCompare, NULL);
|
||||||
|
@ -894,8 +893,6 @@ static int32_t sifExecLogic(SLogicConditionNode *node, SIFCtx *ctx, SIFParam *ou
|
||||||
} else {
|
} else {
|
||||||
for (int32_t m = 0; m < node->pParameterList->length; m++) {
|
for (int32_t m = 0; m < node->pParameterList->length; m++) {
|
||||||
output->status = sifMergeCond(node->condType, output->status, params[m].status);
|
output->status = sifMergeCond(node->condType, output->status, params[m].status);
|
||||||
// taosArrayDestroy(params[m].result);
|
|
||||||
// params[m].result = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_return:
|
_return:
|
||||||
|
@ -1107,11 +1104,13 @@ int32_t doFilterTag(SNode *pFilterNode, SIndexMetaArg *metaArg, SArray *result,
|
||||||
*status = st;
|
*status = st;
|
||||||
}
|
}
|
||||||
|
|
||||||
sifFreeParam(¶m);
|
|
||||||
|
|
||||||
if(taosArrayAddAll(result, param.result) == NULL) {
|
if (taosArrayAddAll(result, param.result) == NULL) {
|
||||||
|
sifFreeParam(¶m);
|
||||||
return TSDB_CODE_OUT_OF_MEMORY;
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sifFreeParam(¶m);
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue