From owner-svn-src-all@FreeBSD.ORG Sat Dec 17 23:49:51 2011 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 C9DCE106564A; Sat, 17 Dec 2011 23:49:51 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8BFC48FC17; Sat, 17 Dec 2011 23:49:51 +0000 (UTC) Received: by dakp5 with SMTP id p5so4299447dak.13 for ; Sat, 17 Dec 2011 15:49:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=1qe+w+BrAxa07066MOzZABuzc8eLQ5x8SejwJVt13Rs=; b=KGrPUwPNfYu+3MsRoAnT+y7YBZiZOrTFzMlL+g3AjECNLhslIu1/3AOLXz0SMEzB7a yxbgdJvdmAxT5wuL2rqVyMjYKYka3cIs4EzQ7p8MmQTr9jvfW/dVG3lVDyOWhnLpRoCt pUBm3cxRv3RAuZGumWyQEkVsaewPPNI0DXbgs= MIME-Version: 1.0 Received: by 10.68.211.5 with SMTP id my5mr27953746pbc.17.1324165791016; Sat, 17 Dec 2011 15:49:51 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.68.197.198 with HTTP; Sat, 17 Dec 2011 15:49:50 -0800 (PST) In-Reply-To: <4EED0F99.2020306@FreeBSD.org> References: <201112171314.pBHDEjtQ060509@svn.freebsd.org> <4EED0F99.2020306@FreeBSD.org> Date: Sat, 17 Dec 2011 15:49:50 -0800 X-Google-Sender-Auth: 70uA_7zmevrolVXR0gxDV-spy4w Message-ID: From: mdf@FreeBSD.org To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228625 - head/usr.bin/csup 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: Sat, 17 Dec 2011 23:49:51 -0000 On Sat, Dec 17, 2011 at 1:54 PM, Dimitry Andric 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. >