wireless: display no IP instead of (null)
This commit is contained in:
parent
c166d2e2d3
commit
9c14b7a527
@ -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");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user