From 47459d25eba62743d0933aec5682c65525af7d7a Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 12 Jan 2001 09:37:32 +0000 Subject: Cannot portably pass a short via va_args, since it will be internally converted to an int on many platforms. So make it be an int explicitly and call that good enough. -Erik --- libc/stdio/printf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/stdio/printf.c') diff --git a/libc/stdio/printf.c b/libc/stdio/printf.c index ffca106e4..c1271d72d 100644 --- a/libc/stdio/printf.c +++ b/libc/stdio/printf.c @@ -403,7 +403,7 @@ int vfnprintf(FILE * op, size_t max_size, const char *fmt, va_list ap) p = __ultostr(tmp + sizeof(tmp) - 1, (unsigned long) ((lval) ? va_arg(ap, unsigned long) - : va_arg(ap, unsigned short)), + : va_arg(ap, unsigned int)), radix, upcase); #if WANT_LONG_LONG || WANT_LONG_LONG_ERROR } @@ -439,7 +439,7 @@ int vfnprintf(FILE * op, size_t max_size, const char *fmt, va_list ap) p = __ltostr(tmp + sizeof(tmp) - 1, (long) ((lval) ? va_arg(ap, long) - : va_arg(ap, short)), 10, 0); + : va_arg(ap, int)), 10, 0); #if WANT_LONG_LONG || WANT_LONG_LONG_ERROR } #endif /* WANT_LONG_LONG || WANT_LONG_LONG_ERROR */ -- cgit v1.2.3