Index: runtime/bin/socket_android.cc |
diff --git a/runtime/bin/socket_android.cc b/runtime/bin/socket_android.cc |
index 365e548ddc3ca5d0006cf09a160db086d3a416e5..ab9c085d72f24abb4d50348cf8f3f578b109f1b5 100644 |
--- a/runtime/bin/socket_android.cc |
+++ b/runtime/bin/socket_android.cc |
@@ -15,7 +15,6 @@ |
#include "bin/fdutils.h" |
#include "bin/file.h" |
-#include "bin/log.h" |
#include "bin/socket.h" |
#include "platform/signal_blocker.h" |
@@ -60,13 +59,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; |
} |
@@ -163,10 +157,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); |
@@ -418,13 +408,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)); |
} |