get_ip_address: return NULL instead of down

This commit is contained in:
Michael Stapelberg 2010-01-26 14:25:21 +01:00
parent a820cf4ce0
commit c166d2e2d3

View File

@ -25,10 +25,8 @@ const char *get_ip_addr(const char *interface) {
getifaddrs(&ifaddr);
if (ifaddr == NULL) {
(void)snprintf(part, sizeof(part), "E: down");
return part;
}
if (ifaddr == NULL)
return NULL;
addrp = ifaddr;