From aef051388d3a67bf320cf17b7bd51e1018b81534 Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Sat, 19 Oct 2024 04:20:48 +0900 Subject: [PATCH] fix munmap return value condition --- src/io-util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io-util.cc b/src/io-util.cc index 243a8295..4146303d 100644 --- a/src/io-util.cc +++ b/src/io-util.cc @@ -316,7 +316,7 @@ bool UnmapFile(const MMapFileHandle &handle, std::string *err) { #else // !WIN32 if (handle.addr && handle.size) { int ret = munmap(reinterpret_cast(handle.addr), size_t(handle.size)); - if (!ret) { + if (ret != 0) { // 0 = success if (err) { (*err) += "warning: munmap failed."; }