From 56c14f79a7a2f2995912d6b866cdf0fc1df09890 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Fri, 30 Dec 2022 15:58:38 +0800 Subject: [PATCH] enh: remove assert tpagebuff.c --- source/util/src/tpagedbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/util/src/tpagedbuf.c b/source/util/src/tpagedbuf.c index 22dc9a906a..085eee7980 100644 --- a/source/util/src/tpagedbuf.c +++ b/source/util/src/tpagedbuf.c @@ -482,7 +482,7 @@ void* getBufPage(SDiskbasedBuf* pBuf, int32_t id) { } void releaseBufPage(SDiskbasedBuf* pBuf, void* page) { - if (ASSERTS(pBuf == NULL || page == NULL, "pBuf or page is NULL")) { + if (ASSERTS(pBuf != NULL && page != NULL, "pBuf or page is NULL")) { return; } SPageInfo* ppi = getPageInfoFromPayload(page); @@ -493,7 +493,7 @@ void releaseBufPageInfo(SDiskbasedBuf* pBuf, SPageInfo* pi) { #ifdef BUF_PAGE_DEBUG uDebug("page_releaseBufPageInfo pageId:%d, used:%d, offset:%" PRId64, pi->pageId, pi->used, pi->offset); #endif - if (ASSERTS(pi->pData == NULL, "pi->pData is NULL")) { + if (ASSERTS(pi->pData != NULL, "pi->pData is NULL")) { return; } -- GitLab