1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-29 12:03:03 +00:00

Unify AF_INET case and AF_INET6 case.

This commit is contained in:
Hajimu UMEMOTO 2015-11-04 15:05:15 +00:00
parent bd4fcecaca
commit 38f16ca658
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=290368

View File

@ -366,22 +366,9 @@ intpr(void (*pfunc)(char *), int af)
xo_emit("{:address/%-15.15s} ", "none");
break;
case AF_INET:
if (Wflag) {
xo_emit("{t:network/%-13s} ",
netname(ifa->ifa_addr, ifa->ifa_netmask));
xo_emit("{t:address/%-17s} ",
routename(ifa->ifa_addr, numeric_addr));
} else {
xo_emit("{t:network/%-13.13s} ",
netname(ifa->ifa_addr, ifa->ifa_netmask));
xo_emit("{t:address/%-17.17s} ",
routename(ifa->ifa_addr, numeric_addr));
}
network = true;
break;
#ifdef INET6
case AF_INET6:
#endif /* INET6 */
if (Wflag) {
xo_emit("{t:network/%-13s} ",
netname(ifa->ifa_addr, ifa->ifa_netmask));
@ -396,7 +383,6 @@ intpr(void (*pfunc)(char *), int af)
network = true;
break;
#endif /* INET6 */
case AF_LINK:
{
struct sockaddr_dl *sdl;