HEADS UP: I will revert this. (was Re: svn commit: r298443 - head/usr.bin/stat)
Marcelo Araujo
araujobsdport at gmail.com
Tue Apr 26 01:15:21 UTC 2016
2016-04-26 5:33 GMT+08:00 Pedro Giffuni <pfg at freebsd.org>:
> Hi Marcelo;
>
> Hi;
>
> I assume you have been very busy.
>
> I will revert this in a couple of hours unless you either explain
> or revert it yourself.
>
Fixed! Sorry my delay, I got a bit busy!
Thanks for the hands up.
>
> Pedro.
>
> On 04/23/16 04:23, luke wrote:
>
>> On Fri, Apr 22, 2016 at 11:43 AM, Marcelo Araujo <araujo at freebsd.org
>> <mailto:araujo at 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 at freebsd.org <mailto:svn-src-head at freebsd.org> mailing
>> list
>> https://lists.freebsd.org/mailman/listinfo/svn-src-head
>> To unsubscribe, send any mail to
>> "svn-src-head-unsubscribe at freebsd.org
>> <mailto:svn-src-head-unsubscribe at freebsd.org>"
>>
>>
>>
>> Hi,
>>
>> Should this be MIN() ?
>>
>> (void)snprintf(tmp, sizeof(tmp), "%dld", MIN(prec, 9));
>>
>>
>> --
>> Chang-Hsien Tsai
>>
>>
--
--
Marcelo Araujo (__)araujo at FreeBSD.org
\\\'',)http://www.FreeBSD.org <http://www.freebsd.org/> \/ \ ^
Power To Server. .\. /_)
More information about the svn-src-all
mailing list