Date: Fri, 22 Apr 2016 03:43:06 +0000 (UTC) From: Marcelo Araujo <araujo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298443 - head/usr.bin/stat Message-ID: <201604220343.u3M3h69m058753@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604220343.u3M3h69m058753>