From 6373404364b7f1edb302e74f939d2a0e8cab719f Mon Sep 17 00:00:00 2001 From: faithwang Date: Wed, 3 Aug 2022 12:06:45 +0800 Subject: [PATCH] fixed a096d74 from https://gitee.com/faithwang/developtools_hdc_standard/pulls/456 rm fd = 0 close Signed-off-by: faithwang --- src/common/base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/base.cpp b/src/common/base.cpp index 921a7c33..a1cefa0b 100644 --- a/src/common/base.cpp +++ b/src/common/base.cpp @@ -1544,7 +1544,7 @@ namespace Base { int CloseFd(int &fd) { int rc = 0; - if (fd >= 0) { + if (fd > 0) { rc = close(fd); if (rc < 0) { char buffer[BUF_SIZE_DEFAULT] = { 0 }; -- Gitee