From owner-cvs-src@FreeBSD.ORG Fri Jun 18 14:32:12 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2865D16A4CE; Fri, 18 Jun 2004 14:32:12 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 059F643D55; Fri, 18 Jun 2004 14:32:12 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 500B15C7FD; Fri, 18 Jun 2004 07:31:27 -0700 (PDT) Date: Fri, 18 Jun 2004 16:31:27 +0200 From: Maxime Henrion To: Dag-Erling Sm?rgrav Message-ID: <20040618143127.GP9228@elvis.mu.org> References: <200406171523.i5HFNpjs011498@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: cvs-src@FreeBSD.org cc: Max Laier cc: cvs-all@FreeBSD.org cc: src-committers@FreeBSD.org Subject: Re: cvs commit: src/contrib/pf/pfctl pfctl_parser.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2004 14:32:12 -0000 Dag-Erling Sm?rgrav wrote: > Max Laier 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