From 680199f9f5150c7a0e974441e1984ffc6a6ba928 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Sat, 27 Aug 2022 18:08:01 +0800 Subject: [PATCH] other: simple hash code optimization --- source/libs/executor/src/tsimplehash.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source/libs/executor/src/tsimplehash.c b/source/libs/executor/src/tsimplehash.c index b839fba543..ee60f09afd 100644 --- a/source/libs/executor/src/tsimplehash.c +++ b/source/libs/executor/src/tsimplehash.c @@ -295,11 +295,7 @@ int32_t tSimpleHashIterateRemove(SSHashObj *pHashObj, const void *key, size_t ke } if (*pIter == (void *)GET_SHASH_NODE_DATA(pNode)) { - if (!pPrev) { - *pIter = NULL; - } else { - *pIter = pPrev; - } + *pIter = pPrev; } FREE_HASH_NODE(pNode);