summaryrefslogtreecommitdiffstats
path: root/lib/libstand/printf.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2010-07-12 15:32:45 +0000
committerjkim <jkim@FreeBSD.org>2010-07-12 15:32:45 +0000
commit06b6c2769b308fbbd16afe28e00b4d8462fcfa7e (patch)
tree1b283ccf8086311c7ca709d77154fd2591efab57 /lib/libstand/printf.c
parent5bc7afa9ee3b92794b014d7bc2bdd80bea3e1d56 (diff)
downloadFreeBSD-src-06b6c2769b308fbbd16afe28e00b4d8462fcfa7e.zip
FreeBSD-src-06b6c2769b308fbbd16afe28e00b4d8462fcfa7e.tar.gz
Use type-specific inline function imax() instead of deprecated macro MAX().
Prodded by: bde
Diffstat (limited to 'lib/libstand/printf.c')
-rw-r--r--lib/libstand/printf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libstand/printf.c b/lib/libstand/printf.c
index 97cf8f7..977c026 100644
--- a/lib/libstand/printf.c
+++ b/lib/libstand/printf.c
@@ -151,7 +151,6 @@ ksprintn(char *nbuf, uintmax_t num, int base, int *lenp, int upper)
static int
kvprintf(char const *fmt, void (*func)(int), void *arg, int radix, va_list ap)
{
-#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#define PCHAR(c) {int cc=(c); if (func) (*func)(cc); else *d++ = cc; retval++; }
char nbuf[MAXNBUF];
char *d;
@@ -422,7 +421,7 @@ number:
if (!ladjust && padc == '0')
dwidth = width - tmp;
- width -= tmp + MAX(dwidth, n);
+ width -= tmp + imax(dwidth, n);
dwidth -= n;
if (!ladjust)
while (width-- > 0)
OpenPOWER on IntegriCloud