From: Michael Stapelberg Date: Tue, 26 Jan 2010 13:25:37 +0000 (+0100) Subject: wireless: display no IP instead of (null) X-Git-Tag: 2.1~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9c14b7a527a34f0ed04a53c72fe85f4d21f094ec;p=i3%2Fi3status wireless: display no IP instead of (null) --- diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c index b8bdefe..946c589 100644 --- a/src/print_wireless_info.c +++ b/src/print_wireless_info.c @@ -86,7 +86,10 @@ void print_wireless_info(const char *interface, const char *format_up, const cha } if (BEGINS_WITH(walk+1, "ip")) { - (void)printf("%s", get_ip_addr(interface)); + const char *ip_address = get_ip_addr(interface); + if (ip_address != NULL) + (void)printf("%s", get_ip_addr(interface)); + else (void)printf("no IP"); walk += strlen("ip"); } }