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

Unified Diff: runtime/bin/socket_linux.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 | « runtime/bin/socket_android.cc ('k') | runtime/bin/socket_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_linux.cc
diff --git a/runtime/bin/socket_linux.cc b/runtime/bin/socket_linux.cc
index c88320259f2c292eedb067b7f2348281f5e04c94..752c912d5e5c46b82013733cb80cbfa596bf4a89 100644
--- a/runtime/bin/socket_linux.cc
+++ b/runtime/bin/socket_linux.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"
#include "vm/thread.h"
@@ -58,10 +57,6 @@ intptr_t Socket::Create(RawAddr addr) {
fd = NO_RETRY_EXPECTED(
socket(addr.ss.ss_family, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0));
if (fd < 0) {
- const int kBufferSize = 1024;
- char error_buf[kBufferSize];
- Log::PrintErr("Error Create: %s\n",
- strerror_r(errno, error_buf, kBufferSize));
return -1;
}
return fd;
@@ -156,10 +151,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_buf[kBufferSize];
- Log::PrintErr("Error getsockname: %s\n",
- strerror_r(errno, error_buf, kBufferSize));
return 0;
}
return SocketAddress::GetAddrPort(&raw);
@@ -445,12 +436,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_buf[kBufferSize];
- Log::PrintErr("%s\n", strerror_r(errno, error_buf, kBufferSize));
- }
+ VOID_TEMP_FAILURE_RETRY(close(fd));
}
« no previous file with comments | « runtime/bin/socket_android.cc ('k') | runtime/bin/socket_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698