Fix error code return.
This commit is contained in:
parent
d609d144be
commit
1eb005a9f0
|
@ -395,6 +395,7 @@ static int32_t walTrimIdxFile(SWal* pWal, int32_t fileIdx) {
|
||||||
|
|
||||||
TdFilePtr pFile = taosOpenFile(fnameStr, TD_FILE_READ | TD_FILE_WRITE);
|
TdFilePtr pFile = taosOpenFile(fnameStr, TD_FILE_READ | TD_FILE_WRITE);
|
||||||
if (pFile == NULL) {
|
if (pFile == NULL) {
|
||||||
|
code = terrno;
|
||||||
goto _exit;
|
goto _exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,7 +410,7 @@ static int32_t walTrimIdxFile(SWal* pWal, int32_t fileIdx) {
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
(void)taosCloseFile(&pFile);
|
(void)taosCloseFile(&pFile);
|
||||||
TAOS_RETURN(TSDB_CODE_SUCCESS);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void printFileSet(int32_t vgId, SArray* fileSet, const char* str) {
|
static void printFileSet(int32_t vgId, SArray* fileSet, const char* str) {
|
||||||
|
|
Loading…
Reference in New Issue