Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Apr 2016 09:34:26 -0500
From:      Pedro Giffuni <pfg@FreeBSD.org>
To:        Marcelo Araujo <araujo@freebsd.org>
Cc:        luke <luke.tw@gmail.com>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r298443 - head/usr.bin/stat
Message-ID:  <571E2AF2.2060300@FreeBSD.org>
In-Reply-To: <CAGVycparsgVzxGXPy2R=YG_noHxDbVKkvkPu3KvEh8RpMH56Sg@mail.gmail.com>
References:  <201604220343.u3M3h69m058753@repo.freebsd.org> <CAGVycparsgVzxGXPy2R=YG_noHxDbVKkvkPu3KvEh8RpMH56Sg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <araujo@freebsd.org 
> <mailto:araujo@freebsd.org>> 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 <mailto: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
>     <mailto:svn-src-head-unsubscribe@freebsd.org>"
>
>
>
> Hi,
>
> Should this be MIN() ?
>
> (void)snprintf(tmp, sizeof(tmp), "%dld", MIN(prec, 9));
>
>
> --
> Chang-Hsien Tsai
>




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