diff --git a/src/util/src/tfile.c b/src/util/src/tfile.c index 0324a5bae8060bfbb7a64cce3e3a8ae793d6f8a4..b9a25ffe23d1c04b596398596302b7c9ae990630 100644 --- a/src/util/src/tfile.c +++ b/src/util/src/tfile.c @@ -57,7 +57,7 @@ int64_t tfclose(int64_t tfd) { ssize_t tfwrite(int64_t tfd, const void *buf, size_t count) { void *p = taosAcquireRef(tsFileRsetId, tfd); - if (p == NULL) return terrno; + if (p == NULL) return -1; int fd = (int)(uintptr_t)p; @@ -71,7 +71,7 @@ ssize_t tfwrite(int64_t tfd, const void *buf, size_t count) { ssize_t tfread(int64_t tfd, void *buf, size_t count) { void *p = taosAcquireRef(tsFileRsetId, tfd); - if (p == NULL) return terrno; + if (p == NULL) return -1; int fd = (int)(uintptr_t)p;