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:
parent
bd4fcecaca
commit
38f16ca658
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=290368
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user