Skip site navigation (1)Skip section navigation (2)
Date:      17 Jun 2001 03:19:21 +0200
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Cc:        Jonathan Lemon <jlemon@flugsvamp.com>, Jonathan Lemon <jlemon@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/rarpd rarpd.c
Message-ID:  <xzp66dvaoo6.fsf@flood.ping.uio.no>
In-Reply-To: <200106161821.OAA38884@khavrinen.lcs.mit.edu>
References:  <200106160640.f5G6e4J30312@freefall.freebsd.org> <20010616180611.B1956@ringworld.oblivion.bg> <20010616110940.G68883@prism.flugsvamp.com> <200106161821.OAA38884@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Garrett Wollman <wollman@khavrinen.lcs.mit.edu> writes:
> The correct way to print the result of the `sizeof' operator using
> `printf()' in C89 is with the `%lu' format (and the argument cast to
> `unsigned long'), and in C99 is with the `%ju' format (and the
> argument cast to `uintmax_t').

I think you mean '%zu', ref. ISO/IEC 9899:1999 section 17.19.6.1 #7:

       z            Specifies that a following d, i, o, u, x, or  X
                    conversion specifier applies to a size_t or the
                    corresponding signed integer type argument;  or
                    that a following n conversion specifier applies
                    to  a  pointer  to  a   signed   integer   type
                    corresponding to size_t argument.

and ISO/IEC 9899:1999 section 7.17 #2:

               size_t

       which  is  the  unsigned  integer  type of the result of the
       sizeof operator;

DES
-- 
Dag-Erling Smorgrav - des@ofug.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzp66dvaoo6.fsf>