Merge pull request #3117 from taosdata/hotfix/TD-1167-fix-coverity-problem
TD-1167 fix coverity problem
This commit is contained in:
commit
6484aaf8c2
|
@ -100,7 +100,7 @@ static void tscDumpEpSetFromVgroupInfo(SCMCorVgroupInfo *pVgroupInfo, SRpcEpSet
|
|||
pEpSet->inUse = (inUse >= 0 && inUse < TSDB_MAX_REPLICA) ? inUse: 0;
|
||||
pEpSet->numOfEps = pVgroupInfo->numOfEps;
|
||||
for (int32_t i = 0; i < pVgroupInfo->numOfEps; ++i) {
|
||||
strncpy(pEpSet->fqdn[i], pVgroupInfo->epAddr[i].fqdn, TSDB_FQDN_LEN);
|
||||
tstrncpy(pEpSet->fqdn[i], pVgroupInfo->epAddr[i].fqdn, sizeof(pEpSet->fqdn[i]));
|
||||
pEpSet->port[i] = pVgroupInfo->epAddr[i].port;
|
||||
}
|
||||
taosCorEndRead(&pVgroupInfo->version);
|
||||
|
@ -117,7 +117,7 @@ static void tscUpdateVgroupInfo(SSqlObj *pObj, SRpcEpSet *pEpSet) {
|
|||
pVgroupInfo->inUse = pEpSet->inUse;
|
||||
pVgroupInfo->numOfEps = pEpSet->numOfEps;
|
||||
for (int32_t i = 0; i < pVgroupInfo->numOfEps; i++) {
|
||||
strncpy(pVgroupInfo->epAddr[i].fqdn, pEpSet->fqdn[i], TSDB_FQDN_LEN);
|
||||
tstrncpy(pVgroupInfo->epAddr[i].fqdn, pEpSet->fqdn[i], sizeof(pEpSet->fqdn[i]));
|
||||
pVgroupInfo->epAddr[i].port = pEpSet->port[i];
|
||||
}
|
||||
tscDebug("after: EndPoint in use: %d", pVgroupInfo->inUse);
|
||||
|
|
|
@ -5242,7 +5242,6 @@ static int32_t getColumnIndexInSource(SQueryTableMsg *pQueryMsg, SSqlFuncMsg *pE
|
|||
j += 1;
|
||||
}
|
||||
}
|
||||
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
@ -5933,6 +5932,7 @@ static SQInfo *createQInfoImpl(SQueryTableMsg *pQueryMsg, SArray* pTableIdList,
|
|||
if (p1 == NULL) {
|
||||
goto _cleanup;
|
||||
}
|
||||
taosArrayPush(pQInfo->tableqinfoGroupInfo.pGroupList, &p1);
|
||||
|
||||
for(int32_t j = 0; j < s; ++j) {
|
||||
STableKeyInfo* info = taosArrayGet(pa, j);
|
||||
|
@ -5956,8 +5956,6 @@ static SQInfo *createQInfoImpl(SQueryTableMsg *pQueryMsg, SArray* pTableIdList,
|
|||
taosHashPut(pQInfo->tableqinfoGroupInfo.map, &id->tid, sizeof(id->tid), &item, POINTER_BYTES);
|
||||
index += 1;
|
||||
}
|
||||
|
||||
taosArrayPush(pQInfo->tableqinfoGroupInfo.pGroupList, &p1);
|
||||
}
|
||||
|
||||
pQInfo->arrTableIdInfo = taosArrayInit(tableIndex, sizeof(STableIdInfo));
|
||||
|
|
Loading…
Reference in New Issue