[TD-4199]<feature> enhance performance

This commit is contained in:
yihaoDeng 2021-08-03 17:46:48 +08:00
parent 806cf56011
commit 38d9fbc7d9
1 changed files with 2 additions and 2 deletions

View File

@ -344,10 +344,10 @@ void* taosHashGetCloneExt(SHashObj *pHashObj, const void *key, size_t keyLen, vo
*sz = pNode->dataLen + EXT_SIZE;
*d = realloc(*d, *sz);
}
memcpy(*d, GET_HASH_NODE_DATA(pNode), pNode->dataLen);
memcpy((char *)(*d), GET_HASH_NODE_DATA(pNode), pNode->dataLen);
// just make runtime happy
if ((*sz) - pNode->dataLen > 0) {
memset((*d) + pNode->dataLen, 0, (*sz) - pNode->dataLen);
memset((char *)(*d) + pNode->dataLen, 0, (*sz) - pNode->dataLen);
}
data = GET_HASH_NODE_DATA(pNode);