Subject: Re: CVS commit: src/usr.bin/netstat
To: Elad Efrat <elad@NetBSD.org>
From: Quentin Garnier <cube@cubidou.net>
List: source-changes
Date: 08/05/2005 09:43:46
--z4IKABJTiQIqPwmW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Fri, Aug 05, 2005 at 10:30:19AM +0300, Elad Efrat wrote:
> Rui Paulo wrote:
>=20
> >Added Files:
> > src/usr.bin/netstat: bpf.c
>=20
> Please consider the attached patch for src/usr.bin/netstat/bpf.c
>=20
> -e.
>=20
> --=20
> Elad Efrat
> PGP Key ID: 0x666EB914
> Index: bpf.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/src/usr.bin/netstat/bpf.c,v
> retrieving revision 1.1
> diff -r1.1 bpf.c
> 65,67c65,70
> < printf("\t%lld total packets received\n", bpf_s.bs_recv);
> < printf("\t%lld total packets captured\n", bpf_s.bs_capt);
> < printf("\t%lld total packets dropped\n", bpf_s.bs_drop);
> ---
> > printf("\t%llu total packets received\n",
> > (unsigned long long) bpf_s.bs_recv);
> > printf("\t%llu total packets captured\n",
> > (unsigned long long) bpf_s.bs_capt);
> > printf("\t%llu total packets dropped\n",
> > (unsigned long long) bpf_s.bs_drop);
> 125,127c128,131
> < printf("%-8lld %-8lld %-8lld ",=20
> < BPFEXT(bde_rcount), BPFEXT(bde_dcount),=20
> < BPFEXT(bde_ccount));
> ---
> > printf("%-8llu %-8llu %-8llu ",=20
> > (unsigned long long) BPFEXT(bde_rcount),
> > (unsigned long long) BPFEXT(bde_dcount),=20
> > (unsigned long long) BPFEXT(bde_ccount));
Neither versions are correct. PRIu64 should be used.
--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.
--z4IKABJTiQIqPwmW
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
iQEVAwUBQvMYstgoQloHrPnoAQIuiwgAyaQPv28qHnW2ReB/kcEnL74IbfiUJv9b
Yc7xvc57/4A6r/DZhXr0lb6iEvIz2VVsZHjLHam1G2seur5NoSr/5bAz+wsYuUlW
a45VIhtwEhAnntpNsSkOMEUbBQkSPI2zItKsmaPW/n16KncF1HphUDybHXbzEIZz
pfIOi1qYRM38gh55dIgh8WPeQqMEBWjXqplr3u325MxZN96Xfq8lTryO9B2QDbqN
I5M4g+t4zxmxbLUWJ1Q5SZiEh1TKdZfAfOIDKrFPKA35JT5h8Xp3iJg99t1X8BaC
WbS+o5Il9cGV6TdYZJ49EVYkvpc6jIcuxVzg0x4fMNOwCRNe440tXw==
=I7cI
-----END PGP SIGNATURE-----
--z4IKABJTiQIqPwmW--