From b158160bc722b6b71fd6396484bc69d4018946ed Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Sat, 5 Mar 2022 16:27:47 +0800 Subject: [PATCH] code optimization --- include/common/tmsg.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index bd537a4a1a..8eb54c757c 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1942,6 +1942,8 @@ static FORCE_INLINE void* tDecodeTSma(void* buf, STSma* pSma) { for (uint16_t i = 0; i < pSma->numOfColIds; ++i) { buf = taosDecodeFixedU16(buf, pSma->colIds + i); } + } else { + pSma->colIds = NULL; } if (pSma->numOfFuncIds > 0) { @@ -1952,6 +1954,8 @@ static FORCE_INLINE void* tDecodeTSma(void* buf, STSma* pSma) { for (uint16_t i = 0; i < pSma->numOfFuncIds; ++i) { buf = taosDecodeFixedU16(buf, pSma->funcIds + i); } + } else { + pSma->funcIds = NULL; } return buf;