sources/network/ipaddress.cpp

changeset 10
3874575d924d
parent 9
e7a09ceb4505
child 19
2046a1651c0b
--- a/sources/network/ipaddress.cpp	Thu Dec 11 16:17:35 2014 +0200
+++ b/sources/network/ipaddress.cpp	Fri Dec 12 00:55:51 2014 +0200
@@ -175,11 +175,10 @@
 {
 	struct addrinfo hints;
 	struct addrinfo* lookup;
-	int errorcode;
 	memset (&hints, 0, sizeof hints);
 	hints.ai_family = AF_INET;
 
-	if ((errorcode = getaddrinfo (node, nullptr, &hints, &lookup)) != 0)
+	if (getaddrinfo (node, nullptr, &hints, &lookup) != 0)
 	{
 		*ok = false;
 		return IPAddress();
@@ -191,6 +190,5 @@
 	result.host = ntohl (addr->sin_addr.s_addr);
 	result.port = ntohs (addr->sin_port);
 	freeaddrinfo (lookup);
-	*ok = true;
 	return result;
 }

mercurial