On Fri, Aug 05, 2005 at 10:30:19AM +0300, Elad Efrat wrote:
> Rui Paulo wrote:
>
> >Added Files:
> > src/usr.bin/netstat: bpf.c
>
> Please consider the attached patch for src/usr.bin/netstat/bpf.c
>
> -e.
>
> --
> Elad Efrat
> PGP Key ID: 0x666EB914
> Index: bpf.c
> ===================================================================
> 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 ",
> < BPFEXT(bde_rcount), BPFEXT(bde_dcount),
> < BPFEXT(bde_ccount));
> ---
> > printf("%-8llu %-8llu %-8llu ",
> > (unsigned long long) BPFEXT(bde_rcount),
> > (unsigned long long) BPFEXT(bde_dcount),
> > (unsigned long long) BPFEXT(bde_ccount));
Neither versions are correct. PRIu64 should be used.
--
Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost
"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.
Attachment:
pgpuIcRww4u77.pgp
Description: PGP signature