Index: runtime/bin/socket_macos.cc |
diff --git a/runtime/bin/socket_macos.cc b/runtime/bin/socket_macos.cc |
index d0643569af0825cbd8b9a7b513b7679892a0f107..ffe0aeed679c83b217f2fe0357a7a15aaffac602 100644 |
--- a/runtime/bin/socket_macos.cc |
+++ b/runtime/bin/socket_macos.cc |
@@ -17,7 +17,6 @@ |
#include "bin/fdutils.h" |
#include "bin/file.h" |
-#include "bin/log.h" |
#include "bin/socket.h" |
#include "platform/signal_blocker.h" |
@@ -62,13 +61,8 @@ intptr_t Socket::Create(RawAddr addr) { |
intptr_t fd; |
fd = NO_RETRY_EXPECTED(socket(addr.ss.ss_family, SOCK_STREAM, 0)); |
if (fd < 0) { |
- const int kBufferSize = 1024; |
- char error_message[kBufferSize]; |
- strerror_r(errno, error_message, kBufferSize); |
- Log::PrintErr("Error Create: %s\n", error_message); |
return -1; |
} |
- |
FDUtils::SetCloseOnExec(fd); |
return fd; |
} |
@@ -165,10 +159,6 @@ intptr_t Socket::GetPort(intptr_t fd) { |
RawAddr raw; |
socklen_t size = sizeof(raw); |
if (NO_RETRY_EXPECTED(getsockname(fd, &raw.addr, &size))) { |
- const int kBufferSize = 1024; |
- char error_message[kBufferSize]; |
- strerror_r(errno, error_message, kBufferSize); |
- Log::PrintErr("Error getsockname: %s\n", error_message); |
return 0; |
} |
return SocketAddress::GetAddrPort(&raw); |
@@ -441,13 +431,7 @@ intptr_t ServerSocket::Accept(intptr_t fd) { |
void Socket::Close(intptr_t fd) { |
ASSERT(fd >= 0); |
- int err = TEMP_FAILURE_RETRY(close(fd)); |
- if (err != 0) { |
- const int kBufferSize = 1024; |
- char error_message[kBufferSize]; |
- strerror_r(errno, error_message, kBufferSize); |
- Log::PrintErr("%s\n", error_message); |
- } |
+ VOID_TEMP_FAILURE_RETRY(close(fd)); |
} |