Date: Fri, 18 Jun 2004 16:31:27 +0200 From: Maxime Henrion <mux@freebsd.org> To: Dag-Erling Sm?rgrav <des@des.no> Cc: src-committers@FreeBSD.org Subject: Re: cvs commit: src/contrib/pf/pfctl pfctl_parser.c Message-ID: <20040618143127.GP9228@elvis.mu.org> In-Reply-To: <xzpwu25vwqi.fsf@dwp.des.no> References: <200406171523.i5HFNpjs011498@repoman.freebsd.org> <xzpwu25vwqi.fsf@dwp.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Sm?rgrav wrote:
> Max Laier <mlaier@FreeBSD.org> writes:
> > Log:
> > Fix printing of u_int64_t with a cast to unsigned long long.
>
> The correct fix is to cast it to uintmax_t and print it with %ju.
Using %llu and a cast to (unsigned long long) is as correct as using
uintmax_t and %ju because the C99 standard says that "long long" is at
least 64-bit wide. We generally use {u,}intmax_t in FreeBSD because
it works in more cases, but in that case we can't because OpenBSD
doesn't have intmax_t.
Cheers,
Maxime
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040618143127.GP9228>
