提交 38c28f1c 编写于 作者: S Shengliang Guan

TD-1912

上级 a82ac7de
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
extern "C" { extern "C" {
#endif #endif
#define treadfile(fd, buf, count) read(fd, buf, count) #define tread(fd, buf, count) read(fd, buf, count)
#define twritefile(fd, buf, count) write(fd, buf, count) #define twrite(fd, buf, count) write(fd, buf, count)
#define tlseekfile(fd, offset, whence) lseek(fd, offset, whence) #define tlseek(fd, offset, whence) lseek(fd, offset, whence)
#define tclosefile(fd) \ #define tclose(fd) \
{ \ { \
if (FD_VALID(x)) { \ if (FD_VALID(x)) { \
close(x); \ close(x); \
......
...@@ -37,7 +37,7 @@ int32_t walRenew(void *handle) { ...@@ -37,7 +37,7 @@ int32_t walRenew(void *handle) {
pthread_mutex_lock(&pWal->mutex); pthread_mutex_lock(&pWal->mutex);
if (pWal->fd >= 0) { if (pWal->fd >= 0) {
close(pWal->fd); tclose(pWal->fd);
wDebug("vgId:%d, file:%s, it is closed", pWal->vgId, pWal->name); wDebug("vgId:%d, file:%s, it is closed", pWal->vgId, pWal->name);
} }
...@@ -310,7 +310,7 @@ static int32_t walRestoreWalFile(SWal *pWal, void *pVnode, FWalWrite writeFp, ch ...@@ -310,7 +310,7 @@ static int32_t walRestoreWalFile(SWal *pWal, void *pVnode, FWalWrite writeFp, ch
(*writeFp)(pVnode, pHead, TAOS_QTYPE_WAL); (*writeFp)(pVnode, pHead, TAOS_QTYPE_WAL);
} }
close(fd); tclose(fd);
tfree(buffer); tfree(buffer);
return code; return code;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册