fix: fix coverity errors
This commit is contained in:
parent
e8123178e3
commit
22a2f37fe5
|
@ -324,7 +324,7 @@ static SFunctionNode* createFunction(const char* pName, SNodeList* pParameterLis
|
||||||
if (NULL == pFunc) {
|
if (NULL == pFunc) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
strcpy(pFunc->functionName, pName);
|
snprintf(pFunc->functionName, sizeof(pFunc->functionName), "%s", pName);
|
||||||
pFunc->pParameterList = pParameterList;
|
pFunc->pParameterList = pParameterList;
|
||||||
if (TSDB_CODE_SUCCESS != getFuncInfo(pFunc)) {
|
if (TSDB_CODE_SUCCESS != getFuncInfo(pFunc)) {
|
||||||
pFunc->pParameterList = NULL;
|
pFunc->pParameterList = NULL;
|
||||||
|
@ -402,10 +402,6 @@ static int32_t createMergeFunction(const SFunctionNode* pSrcFunc, const SFunctio
|
||||||
if (TSDB_CODE_SUCCESS == code) {
|
if (TSDB_CODE_SUCCESS == code) {
|
||||||
*pMergeFunc = pFunc;
|
*pMergeFunc = pFunc;
|
||||||
} else {
|
} else {
|
||||||
if (NULL != pFunc) {
|
|
||||||
pFunc->pParameterList = NULL;
|
|
||||||
nodesDestroyNode((SNode*)pFunc);
|
|
||||||
}
|
|
||||||
nodesDestroyList(pParameterList);
|
nodesDestroyList(pParameterList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,9 @@ double findOnlyResult(tMemBucket *pMemBucket) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t groupId = getGroupId(pMemBucket->numOfSlots, i, pMemBucket->times);
|
int32_t groupId = getGroupId(pMemBucket->numOfSlots, i, pMemBucket->times);
|
||||||
SArray *list = *(SArray **)taosHashGet(pMemBucket->groupPagesMap, &groupId, sizeof(groupId));
|
SArray **pList = taosHashGet(pMemBucket->groupPagesMap, &groupId, sizeof(groupId));
|
||||||
|
if (pList != NULL) {
|
||||||
|
SArray *list = *pList;
|
||||||
assert(list->size == 1);
|
assert(list->size == 1);
|
||||||
|
|
||||||
int32_t *pageId = taosArrayGet(list, 0);
|
int32_t *pageId = taosArrayGet(list, 0);
|
||||||
|
@ -107,6 +109,7 @@ double findOnlyResult(tMemBucket *pMemBucket) {
|
||||||
GET_TYPED_DATA(v, double, pMemBucket->type, pPage->data);
|
GET_TYPED_DATA(v, double, pMemBucket->type, pPage->data);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue