Re: netstat: zap unused maxmif

2018-06-04 Thread Jeremie Courreges-Anglas
On Sun, Jun 03 2018, Klemens Nanni  wrote:
> Unused since introduction in 1.17 from 2015.
>
> OK?

ok jca@

> Index: mroute6.c
> ===
> RCS file: /cvs/src/usr.bin/netstat/mroute6.c,v
> retrieving revision 1.23
> diff -u -p -r1.23 mroute6.c
> --- mroute6.c 8 May 2017 09:31:34 -   1.23
> +++ mroute6.c 3 Jun 2018 14:09:13 -
> @@ -92,7 +92,6 @@ mroute6pr(void)
>   struct mif6info *mif;
>   size_t needed, mifi, nummifs, mfci, nummfcs;
>   int banner_printed, saved_nflag;
> - mifi_t maxmif = 0;
>   u_int mrtproto;
>   int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, IPV6CTL_MRTPROTO };
>   size_t len = sizeof(int);
> @@ -119,8 +118,6 @@ mroute6pr(void)
>   needed = get_sysctl(mib, sizeof(mib) / sizeof(mib[0]), &buf);
>   nummifs = needed / sizeof(*mif);
>   mif = (struct mif6info *)buf;
> - if (nummifs)
> - maxmif = mif[nummifs - 1].m6_mifi;
>  
>   banner_printed = 0;
>   for (mifi = 0; mifi < nummifs; ++mifi, ++mif) {
>

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: netstat: zap unused maxmif

2018-06-03 Thread Alexander Bluhm
On Sun, Jun 03, 2018 at 04:22:02PM +0200, Klemens Nanni wrote:
> Unused since introduction in 1.17 from 2015.
> 
> OK?

OK bluhm@

> Index: mroute6.c
> ===
> RCS file: /cvs/src/usr.bin/netstat/mroute6.c,v
> retrieving revision 1.23
> diff -u -p -r1.23 mroute6.c
> --- mroute6.c 8 May 2017 09:31:34 -   1.23
> +++ mroute6.c 3 Jun 2018 14:09:13 -
> @@ -92,7 +92,6 @@ mroute6pr(void)
>   struct mif6info *mif;
>   size_t needed, mifi, nummifs, mfci, nummfcs;
>   int banner_printed, saved_nflag;
> - mifi_t maxmif = 0;
>   u_int mrtproto;
>   int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, IPV6CTL_MRTPROTO };
>   size_t len = sizeof(int);
> @@ -119,8 +118,6 @@ mroute6pr(void)
>   needed = get_sysctl(mib, sizeof(mib) / sizeof(mib[0]), &buf);
>   nummifs = needed / sizeof(*mif);
>   mif = (struct mif6info *)buf;
> - if (nummifs)
> - maxmif = mif[nummifs - 1].m6_mifi;
>  
>   banner_printed = 0;
>   for (mifi = 0; mifi < nummifs; ++mifi, ++mif) {