From: Michael Stapelberg Date: Tue, 26 Jan 2010 13:25:21 +0000 (+0100) Subject: get_ip_address: return NULL instead of down X-Git-Tag: 2.1~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c166d2e2d312e198a4dc9039302c5b82ed2805d1;p=i3%2Fi3status get_ip_address: return NULL instead of down --- 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;