From c166d2e2d312e198a4dc9039302c5b82ed2805d1 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 26 Jan 2010 14:25:21 +0100 Subject: get_ip_address: return NULL instead of down --- src/print_ip_addr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/print_ip_addr.c') 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; -- cgit v1.2.3