Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2534)

Unified Diff: runtime/bin/socket_android.cc

Issue 426833004: Don't print errors to stderr in socket_*. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/socket_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « no previous file | runtime/bin/socket_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698