From owner-svn-src-head@freebsd.org Mon Apr 25 14:40:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E92BB1BA4C for ; Mon, 25 Apr 2016 14:40:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm47-vm7.bullet.mail.bf1.yahoo.com (nm47-vm7.bullet.mail.bf1.yahoo.com [216.109.115.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 654761F58 for ; Mon, 25 Apr 2016 14:40:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1461594853; bh=d+ierU8X5UlF1aO9XnTtz7IzSyIEW0thnMmGizMFQgc=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=Z7yy+m4DYJL2bT7kpFvBwYLs/qw5bJGl7awZcA3Y0LFbDyzW21WMImTYwcjRU0/9IrRHgXBzFfK8Dev0WpOl5UEiaCU+y+8+LWqOXvCzv1+lYX/0oqsGdpzXEsWDKwXg0pO6loYwgUoIWoSvCsO/BIhG1yGVTpbXLEFa0xRFHcsORXH4xTqL6fQdCuzOQEsJGbrgDaH/c7FAaFdzaRsp/Z25qLYUGsbKc0vl3VugM0JJWv+bCYqpljJEpD4EH6TICPTgaYMqve+59fmlt4YRauK43dqwbvcK2JCDFyqJqjs6f91GQ+u2LOCNPJY6g54ANY/OAsRhgCpj1wLQiMJpQw== Received: from [98.139.170.181] by nm47.bullet.mail.bf1.yahoo.com with NNFMP; 25 Apr 2016 14:34:13 -0000 Received: from [98.139.211.195] by tm24.bullet.mail.bf1.yahoo.com with NNFMP; 25 Apr 2016 14:34:13 -0000 Received: from [127.0.0.1] by smtp204.mail.bf1.yahoo.com with NNFMP; 25 Apr 2016 14:34:13 -0000 X-Yahoo-Newman-Id: 661823.91304.bm@smtp204.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: FCM5QVcVM1lSxcD_mycIvyJzWyD_lz5OhgOuvTtHN_oY9Kk ZEIjnV61PE_TKUFbUKOEsQwQaaHsoCc96yxuqgAbMkXKX.MHkH2j02wE7VWx GySzaIqLR11JlTQAkcnghO1S2fSF7Sw3eM3LeIFwxKPt.IJSIvY8iw.ajeRD mRrCaEL8nrn7JqK7mbRdCbV7CAxfFRW2Xqbycp14t0fQw48lpbDmR2qjpqM. MnMA7hq7ARshBd59jL7hwq0s9gprp2_Lng.QxBzJkckwqiVjDba4Ctouas42 THTAiWP8w.nheFpgp7MTtz2IVq60UjPm0.2GEQRZdElIJbXjp2_14UnRaCB_ VY24X0BWhYOimuM7Dq54IJi3QROjgGgHPGCiykkKReK9T.i63Btv2cBTzpHA I1mL4wSSXBhH8UO21Ln4zqAMr3147...FOJcigE6n3SL.AtmGm97Yesh47pi rg6LJ3HgvK.7CuTipGbgcHaCG.cSs125cIirttq3GvRxZBxXHiNDKhvS6Nif IOinPVeY_BXaUC5hD6AvdC3Wxzne1Hz5O X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r298443 - head/usr.bin/stat To: Marcelo Araujo References: <201604220343.u3M3h69m058753@repo.freebsd.org> Cc: luke , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: <571E2AF2.2060300@FreeBSD.org> Date: Mon, 25 Apr 2016 09:34:26 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2016 14:40:59 -0000 Marcelo, please revert. And check your script, of course. Pedro. On 23/04/2016 04:23, luke wrote: > On Fri, Apr 22, 2016 at 11:43 AM, Marcelo Araujo > wrote: > > Author: araujo > Date: Fri Apr 22 03:43:06 2016 > New Revision: 298443 > URL: https://svnweb.freebsd.org/changeset/base/298443 > > Log: > Use macro MAX() from sys/param.h. > > MFC after: 2 weeks. > > Modified: > head/usr.bin/stat/stat.c > > Modified: head/usr.bin/stat/stat.c > ============================================================================== > --- head/usr.bin/stat/stat.c Fri Apr 22 03:37:27 2016 > (r298442) > +++ head/usr.bin/stat/stat.c Fri Apr 22 03:43:06 2016 > (r298443) > @@ -1025,7 +1025,7 @@ format1(const struct stat *st, > * > * Nanoseconds: long. > */ > - (void)snprintf(tmp, sizeof(tmp), "%dld", prec > 9 > ? 9 : prec); > + (void)snprintf(tmp, sizeof(tmp), "%dld", MAX(9, > prec)); > (void)strcat(lfmt, tmp); > > /* > _______________________________________________ > svn-src-head@freebsd.org mailing > list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to > "svn-src-head-unsubscribe@freebsd.org > " > > > > Hi, > > Should this be MIN() ? > > (void)snprintf(tmp, sizeof(tmp), "%dld", MIN(prec, 9)); > > > -- > Chang-Hsien Tsai >