code optimization

This commit is contained in:
Cary Xu 2022-03-05 16:27:47 +08:00
parent 80dadafc87
commit b158160bc7
1 changed files with 4 additions and 0 deletions

View File

@ -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;