[td-255]refactor.

This commit is contained in:
Haojun Liao 2021-09-07 17:16:56 +08:00
parent 258c221a44
commit c0aff8098d
2 changed files with 2 additions and 8 deletions

View File

@ -4407,7 +4407,7 @@ SVgroupsInfo* tscVgroupInfoClone(SVgroupsInfo *vgroupList) {
}
size_t size = sizeof(SVgroupsInfo) + sizeof(SVgroupMsg) * vgroupList->numOfVgroups;
SVgroupsInfo* pNew = calloc(1, size);
SVgroupsInfo* pNew = malloc(size);
if (pNew == NULL) {
return NULL;
}
@ -4422,7 +4422,6 @@ SVgroupsInfo* tscVgroupInfoClone(SVgroupsInfo *vgroupList) {
pNewVInfo->numOfEps = pvInfo->numOfEps;
for(int32_t j = 0; j < pvInfo->numOfEps; ++j) {
// pNewVInfo->epAddr[j].fqdn = strdup(pvInfo->epAddr[j].fqdn);
pNewVInfo->epAddr[j].port = pvInfo->epAddr[j].port;
tstrncpy(pNewVInfo->epAddr[j].fqdn, pvInfo->epAddr[j].fqdn, TSDB_FQDN_LEN);
}

View File

@ -775,12 +775,7 @@ typedef struct {
typedef struct {
int32_t numOfVgroups;
SVgroupMsg vgroups[];
} SVgroupsInfo;
typedef struct {
int32_t numOfVgroups;
SVgroupMsg vgroups[];
} SVgroupsMsg;
} SVgroupsMsg, SVgroupsInfo;
typedef struct STableMetaMsg {
int32_t contLen;