Skip to content
Snippets Groups Projects
Commit 668af232 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

ip_utils: cleanup

Change-Id: I995159823f1fab0fc5c1041e30cd764472a65754
parent 0e6730ef
No related branches found
No related tags found
No related merge requests found
......@@ -89,11 +89,7 @@ ip_utils::getHostName()
p = inet_ntop(AF_INET, &localAddr.sin_addr, tempstr, sizeof(tempstr));
if (p) {
ret.address = p;
} else {
return {};
}
} else {
return {};
}
#elif (defined(BSD) && BSD >= 199306) || defined(__FreeBSD_kernel__)
struct ifaddrs* ifap;
......@@ -180,9 +176,6 @@ ip_utils::getHostName()
j++; // Increment j if we found an address which is not loopback and is up.
}
close(localSock);
if (p == NULL) {
return {};
}
#endif
return ret;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment