Use type-specific inline function imax() instead of deprecated macro MAX().
Prodded by: bde
This commit is contained in:
parent
5bc7afa9ee
commit
06b6c2769b
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user