From owner-svn-src-all@FreeBSD.ORG Thu Aug 12 17:15:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4310710656A8; Thu, 12 Aug 2010 17:15:04 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id F38388FC14; Thu, 12 Aug 2010 17:15:03 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id A8A451FFC33; Thu, 12 Aug 2010 17:15:02 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 041C284525; Thu, 12 Aug 2010 19:15:02 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: John Baldwin References: <201008121358.o7CDwk0d098768@svn.freebsd.org> <86pqxn50vr.fsf@ds4.des.no> <4C6414A7.6020306@FreeBSD.org> Date: Thu, 12 Aug 2010 19:15:01 +0200 In-Reply-To: <4C6414A7.6020306@FreeBSD.org> (John Baldwin's message of "Thu, 12 Aug 2010 11:35:03 -0400") Message-ID: <868w4bda7e.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Takanori Watanabe , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r211221 - head/usr.sbin/acpi/acpidump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2010 17:15:04 -0000 John Baldwin writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Slightly better: > > > > printf("\tClass %u Base Address 0x%jx Length %ju\n\n", > > (unsigned int)tcpa->platform_class, (uintmax_t)paddr, (uintmax_t= )len); > > > > but it would probably be easier to define paddr and len as unsigned long > > long instead of the misspelled u_int64_t, and use %llx and %llu. > Depends. If the table defines a field to be a 64-bit integer, it is > better to use an explicitly-64-bit integer type such as uint64_t > rather than assuming that 'long long' is 64-bit. Actually, paddr and len are a memory address and an object size, respectively, so the logical thing would be to use uintptr_t and size_t with uintmax_t casts... DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no