get_ip_address: return NULL instead of down
This commit is contained in:
parent
a820cf4ce0
commit
c166d2e2d3
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user