diff options
Diffstat (limited to 'lldb/source/Host')
-rw-r--r-- | lldb/source/Host/common/SocketAddress.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Host/common/TCPSocket.cpp | 8 |
2 files changed, 4 insertions, 10 deletions
diff --git a/lldb/source/Host/common/SocketAddress.cpp b/lldb/source/Host/common/SocketAddress.cpp index 882fd24558f..960ed18dc76 100644 --- a/lldb/source/Host/common/SocketAddress.cpp +++ b/lldb/source/Host/common/SocketAddress.cpp @@ -174,12 +174,6 @@ bool SocketAddress::SetPort(uint16_t port) { } // SocketAddress assignment operator -const SocketAddress &SocketAddress::operator=(const SocketAddress &rhs) { - if (this != &rhs) - m_socket_addr = rhs.m_socket_addr; - return *this; -} - const SocketAddress &SocketAddress:: operator=(const struct addrinfo *addr_info) { Clear(); diff --git a/lldb/source/Host/common/TCPSocket.cpp b/lldb/source/Host/common/TCPSocket.cpp index e84054f3f58..8be0b2e2fc0 100644 --- a/lldb/source/Host/common/TCPSocket.cpp +++ b/lldb/source/Host/common/TCPSocket.cpp @@ -149,9 +149,9 @@ Status TCPSocket::Connect(llvm::StringRef name) { if (!DecodeHostAndPort(name, host_str, port_str, port, &error)) return error; - auto addresses = lldb_private::SocketAddress::GetAddressInfo( + std::vector<SocketAddress> addresses = SocketAddress::GetAddressInfo( host_str.c_str(), nullptr, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP); - for (auto address : addresses) { + for (SocketAddress &address : addresses) { error = CreateSocket(address.GetFamily()); if (error.Fail()) continue; @@ -187,9 +187,9 @@ Status TCPSocket::Listen(llvm::StringRef name, int backlog) { if (host_str == "*") host_str = "0.0.0.0"; - auto addresses = lldb_private::SocketAddress::GetAddressInfo( + std::vector<SocketAddress> addresses = SocketAddress::GetAddressInfo( host_str.c_str(), nullptr, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP); - for (auto address : addresses) { + for (SocketAddress &address : addresses) { int fd = Socket::CreateSocket(address.GetFamily(), kType, IPPROTO_TCP, m_child_processes_inherit, error); if (error.Fail()) { |