From 8e62453284fa611bbbe7e3e83f8fba592d0f5c95 Mon Sep 17 00:00:00 2001 From: Max Zhang <60412045+maxz-lab@users.noreply.github.com> Date: Thu, 12 Sep 2024 10:25:57 -0700 Subject: [PATCH] Update tcp_socket_posix remove unnecessary errno translation --- net/socket/tcp_socket_posix.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/net/socket/tcp_socket_posix.cc b/net/socket/tcp_socket_posix.cc index 7f1817200b7c..cd6362a1f569 100644 --- a/net/socket/tcp_socket_posix.cc +++ b/net/socket/tcp_socket_posix.cc @@ -239,12 +239,7 @@ int TCPSocketPosix::Bind(const IPEndPoint& address) { SockaddrStorage storage; if (!address.ToSockAddr(storage.addr, &storage.addr_len)) return ERR_ADDRESS_INVALID; - int rv = socket_->Bind(storage); - if (rv != 0){ - DLOG(ERROR) << "TCPSocketPosix::Bind returned an error" << rv; - return MapSystemError(errno); - } - return OK; + return socket_->Bind(storage); } int TCPSocketPosix::Listen(int backlog) {