[td-225] fix compiler error.

This commit is contained in:
Haojun Liao 2020-10-26 16:06:23 +08:00
parent 2e9fbee43c
commit c5087aa444
1 changed files with 3 additions and 3 deletions

View File

@ -1722,14 +1722,14 @@ SArray* tscCloneVgroupTableInfo(SArray* pVgroupTables) {
for (size_t i = 0; i < num; i++) {
SVgroupTableInfo* pInfo = taosArrayGet(pVgroupTables, i);
SVgroupTableInfo info = {{.vgId = 0, .epAddr = {0}, .numOfEps = 0}, .itemList = NULL};
info.vgInfo = pInfo->vgInfo;
SVgroupTableInfo info;
memset(&info, 0, sizeof(SVgroupTableInfo));
info.vgInfo = pInfo->vgInfo;
for(int32_t j = 0; j < pInfo->vgInfo.numOfEps; ++j) {
info.vgInfo.epAddr[j].fqdn = strdup(pInfo->vgInfo.epAddr[j].fqdn);
}
info.itemList = taosArrayClone(pInfo->itemList);
taosArrayPush(pa, &info);
}