From 38d9fbc7d91a8cdd8cb77bbc13f271587952c60b Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 3 Aug 2021 17:46:48 +0800 Subject: [PATCH] [TD-4199] enhance performance --- src/util/src/hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/src/hash.c b/src/util/src/hash.c index 4398b2d457..d4e23c900f 100644 --- a/src/util/src/hash.c +++ b/src/util/src/hash.c @@ -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); -- GitLab