diff --git a/usr.bin/netstat/nhops.c b/usr.bin/netstat/nhops.c index 1db3c2d3716..1a5d8eee74b 100644 --- a/usr.bin/netstat/nhops.c +++ b/usr.bin/netstat/nhops.c @@ -64,7 +64,7 @@ #include "common.h" /* column widths; each followed by one space */ -#define WID_IF_DEFAULT 12 /* width of netif column */ +#define WID_IF_DEFAULT (Wflag ? IFNAMSIZ : 12) /* width of netif column */ #ifndef INET6 #define WID_DST_DEFAULT(af) 18 /* width of destination column */ #define WID_GW_DEFAULT(af) 18 /* width of gateway column */ diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index 93e882052de..482fb07ff95 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -184,7 +184,7 @@ pr_family(int af1) } /* column widths; each followed by one space */ -#define WID_IF_DEFAULT 12 /* width of netif column */ +#define WID_IF_DEFAULT (Wflag ? IFNAMSIZ : 12) /* width of netif column */ #ifndef INET6 #define WID_DST_DEFAULT(af) 18 /* width of destination column */ #define WID_GW_DEFAULT(af) 18 /* width of gateway column */