Fix error code return.

This commit is contained in:
xiao-77 2024-11-27 16:27:00 +08:00
parent d609d144be
commit 1eb005a9f0
1 changed files with 2 additions and 1 deletions

View File

@ -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) {