Date: Sat, 17 Dec 2011 15:49:50 -0800 From: mdf@FreeBSD.org To: Dimitry Andric <dim@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228625 - head/usr.bin/csup Message-ID: <CAMBSHm9=0%2BZ%2BC687097WW_mGaNUpJ7Tbo7SZa4XLr7g0L2ecOQ@mail.gmail.com> In-Reply-To: <4EED0F99.2020306@FreeBSD.org> References: <201112171314.pBHDEjtQ060509@svn.freebsd.org> <CAMBSHm9cBbCxZ9MvgPvKgYfSxPSpeofgTq0NnJo=e3tR5idxEQ@mail.gmail.com> <4EED0F99.2020306@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 17, 2011 at 1:54 PM, Dimitry Andric <dim@freebsd.org> wrote: > On 2011-12-17 22:32, mdf@FreeBSD.org wrote: > ... >>> =A0In usr.bin/csup/auth.c, use the correct number of bytes for zeroing = the >>> =A0shared secret, and use long long format to snprintf a time_t. >> If casting is necessary, style prefers intmax_t or uintmax_t, since >> those are always wide enough. > > I don't see anything about that in style(9), maybe it should be added > then? Probably; Bruce has mentioned it many times in the past, and as bz@ notes, it's a well-defined type with a well-defined conversion specifier. Also, long long is a bit of a hack that came in before C99 standardized on a few wider types, and the PRIu64 macros are really hideous. Thanks, matthew >=A0In any case, I only changed the %ld format to %lld, because > time_t is int, long or long long depending on arch. =A0Long long is just > the widest type required in this case. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm9=0%2BZ%2BC687097WW_mGaNUpJ7Tbo7SZa4XLr7g0L2ecOQ>