# HG changeset patch # User Teemu Piippo # Date 1418579483 -7200 # Node ID 2046a1651c0bca742d34e1656a5672e5f5a57a9d # Parent 56a1ac7d931b9933c3a012e4a37027dee4af3566 - removed needless 'struct's diff -r 56a1ac7d931b -r 2046a1651c0b sources/network/ipaddress.cpp --- a/sources/network/ipaddress.cpp Sun Dec 14 19:42:43 2014 +0200 +++ b/sources/network/ipaddress.cpp Sun Dec 14 19:51:23 2014 +0200 @@ -173,8 +173,8 @@ STATIC METHOD IPAddress::resolve (String node, bool* ok) -> IPAddress { - struct addrinfo hints; - struct addrinfo* lookup; + addrinfo hints; + addrinfo* lookup; memset (&hints, 0, sizeof hints); hints.ai_family = AF_INET; @@ -186,7 +186,7 @@ IPAddress result; assert (lookup != nullptr); - sockaddr_in* addr = reinterpret_cast (lookup[0].ai_addr); + sockaddr_in* addr = reinterpret_cast (lookup[0].ai_addr); result.host = ntohl (addr->sin_addr.s_addr); result.port = ntohs (addr->sin_port); freeaddrinfo (lookup); diff -r 56a1ac7d931b -r 2046a1651c0b sources/network/udpsocket.cpp --- a/sources/network/udpsocket.cpp Sun Dec 14 19:42:43 2014 +0200 +++ b/sources/network/udpsocket.cpp Sun Dec 14 19:51:23 2014 +0200 @@ -70,13 +70,13 @@ METHOD UDPSocket::bind (unsigned short port) -> bool { - struct sockaddr_in svaddr; + sockaddr_in svaddr; memset (&svaddr, 0, sizeof svaddr); svaddr.sin_family = AF_INET; svaddr.sin_port = htons (port); svaddr.sin_addr.s_addr = htonl (INADDR_ANY); - if (::bind (m_socket, reinterpret_cast (&svaddr), sizeof svaddr) == -1) + if (::bind (m_socket, reinterpret_cast (&svaddr), sizeof svaddr) == -1) { m_error = String ("Couldn't bind to port ") + String::from_number (port); return false; @@ -93,7 +93,7 @@ sockaddr_in claddr; socklen_t socklen = sizeof claddr; int length = ::recvfrom (m_socket, g_huffmanBuffer, sizeof g_huffmanBuffer, 0, - reinterpret_cast (&claddr), &socklen); + reinterpret_cast (&claddr), &socklen); if (length == -1) {