fix: coverity issues

CID: 400059
This commit is contained in:
Ganlin Zhao 2022-10-24 14:16:17 +08:00
parent c2bff98311
commit 120a3ca4b9
1 changed files with 5 additions and 2 deletions

View File

@ -344,8 +344,11 @@ static FORCE_INLINE void varToNchar(char *buf, SScalarParam *pOut, int32_t rowIn
int32_t outputMaxLen = (inputLen + 1) * TSDB_NCHAR_SIZE + VARSTR_HEADER_SIZE;
char *t = taosMemoryCalloc(1, outputMaxLen);
/*int32_t resLen = */ taosMbsToUcs4(varDataVal(buf), inputLen, (TdUcs4 *)varDataVal(t),
outputMaxLen - VARSTR_HEADER_SIZE, &len);
int32_t ret = taosMbsToUcs4(varDataVal(buf), inputLen, (TdUcs4 *)varDataVal(t),
outputMaxLen - VARSTR_HEADER_SIZE, &len);
if (!ret) {
sclError("failed to convert to NCHAR");
}
varDataSetLen(t, len);
colDataAppend(pOut->columnData, rowIndex, t, false);