fix: pread return code issue

This commit is contained in:
dapan1121 2024-07-24 17:25:31 +08:00
parent 68e5709efc
commit 47c5958cb2
2 changed files with 7 additions and 4 deletions

View File

@ -1284,15 +1284,17 @@ int64_t taosPReadFile(TdFilePtr pFile, void *buf, int64_t count, int64_t offset)
(void)taosThreadRwlockUnlock(&(pFile->rwlock)); (void)taosThreadRwlockUnlock(&(pFile->rwlock));
#endif #endif
terrno = code; if (code) {
terrno = code;
return code;
}
return code; return ret;
} }
int32_t taosFsyncFile(TdFilePtr pFile) { int32_t taosFsyncFile(TdFilePtr pFile) {
if (pFile == NULL) { if (pFile == NULL) {
terrno = TSDB_CODE_INVALID_PARA; return 0;
return terrno;
} }
int32_t code = 0; int32_t code = 0;

View File

@ -110,6 +110,7 @@ int32_t taosKillChildOnParentStopped() {
return code; return code;
#endif #endif
return 0;
} }
#endif #endif