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));
#endif
if (code) {
terrno = code;
return code;
}
return ret;
}
int32_t taosFsyncFile(TdFilePtr pFile) {
if (pFile == NULL) {
terrno = TSDB_CODE_INVALID_PARA;
return terrno;
return 0;
}
int32_t code = 0;

View File

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