enh: code optimization of tlog.c

This commit is contained in:
Kaili Xu 2024-12-25 09:08:32 +08:00 committed by GitHub
parent 1d91252188
commit f783dc765d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -661,7 +661,7 @@ static int32_t taosInitNormalLog(const char *logName, int32_t maxFileNum) {
tsLogObj.lines = (int32_t)(filesize / 60);
if (taosLSeekFile(tsLogObj.logHandle->pFile, 0, SEEK_END) < 0) {
TAOS_CHECK_EXIT(code = terrno ? terrno : -1);
TAOS_CHECK_EXIT(terrno);
}
(void)snprintf(name, sizeof(name),
@ -669,7 +669,7 @@ static int32_t taosInitNormalLog(const char *logName, int32_t maxFileNum) {
" new log file\n"
"==================================================\n");
if (taosWriteFile(tsLogObj.logHandle->pFile, name, (uint32_t)strlen(name)) <= 0) {
TAOS_CHECK_EXIT(code = terrno ? terrno : -1);
TAOS_CHECK_EXIT(terrno);
}
_exit: