fix:[TD-31097]process return value
This commit is contained in:
parent
235712b79e
commit
1d98b32721
|
@ -3641,7 +3641,7 @@ int32_t tEncodeSTqOffsetVal(SEncoder* pEncoder, const STqOffsetVal* pOffsetVal);
|
|||
int32_t tDecodeSTqOffsetVal(SDecoder* pDecoder, STqOffsetVal* pOffsetVal);
|
||||
void tFormatOffset(char* buf, int32_t maxLen, const STqOffsetVal* pVal);
|
||||
bool tOffsetEqual(const STqOffsetVal* pLeft, const STqOffsetVal* pRight);
|
||||
int32_t tOffsetCopy(STqOffsetVal* pLeft, const STqOffsetVal* pRight);
|
||||
void tOffsetCopy(STqOffsetVal* pLeft, const STqOffsetVal* pRight);
|
||||
void tOffsetDestroy(void* pVal);
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -9238,18 +9238,17 @@ bool tOffsetEqual(const STqOffsetVal *pLeft, const STqOffsetVal *pRight) {
|
|||
return false;
|
||||
}
|
||||
|
||||
int32_t tOffsetCopy(STqOffsetVal *pLeft, const STqOffsetVal *pRight) {
|
||||
void tOffsetCopy(STqOffsetVal *pLeft, const STqOffsetVal *pRight) {
|
||||
tOffsetDestroy(pLeft);
|
||||
*pLeft = *pRight;
|
||||
if (IS_VAR_DATA_TYPE(pRight->primaryKey.type)) {
|
||||
pLeft->primaryKey.pData = taosMemoryMalloc(pRight->primaryKey.nData);
|
||||
if (pLeft->primaryKey.pData == NULL) {
|
||||
uError("failed to allocate memory for offset");
|
||||
return terrno;
|
||||
return;
|
||||
}
|
||||
(void)memcpy(pLeft->primaryKey.pData, pRight->primaryKey.pData, pRight->primaryKey.nData);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void tOffsetDestroy(void *param) {
|
||||
|
|
|
@ -1437,7 +1437,7 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT
|
|||
}
|
||||
|
||||
end:
|
||||
(void) tOffsetCopy(&pTaskInfo->streamInfo.currentOffset, pOffset);
|
||||
tOffsetCopy(&pTaskInfo->streamInfo.currentOffset, pOffset);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue