Use type-specific inline function imax() instead of deprecated macro MAX().

Prodded by:	bde
This commit is contained in:
Jung-uk Kim 2010-07-12 15:32:45 +00:00
parent 72ccfc240b
commit 4a82f10889
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=209949
2 changed files with 2 additions and 3 deletions

View File

@ -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 @@ reswitch: switch (ch = (u_char)*fmt++) {
if (!ladjust && padc == '0')
dwidth = width - tmp;
width -= tmp + MAX(dwidth, n);
width -= tmp + imax(dwidth, n);
dwidth -= n;
if (!ladjust)
while (width-- > 0)

View File

@ -813,7 +813,7 @@ reswitch: switch (ch = (u_char)*fmt++) {
if (!ladjust && padc == '0')
dwidth = width - tmp;
width -= tmp + MAX(dwidth, n);
width -= tmp + imax(dwidth, n);
dwidth -= n;
if (!ladjust)
while (width-- > 0)