}
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");
}
}