diff options
Diffstat (limited to 'src/print_ip_addr.c')
-rw-r--r-- | src/print_ip_addr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/print_ip_addr.c b/src/print_ip_addr.c index 6ddd35a..e719d2f 100644 --- a/src/print_ip_addr.c +++ b/src/print_ip_addr.c @@ -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; |