diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-01-12 09:37:32 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-01-12 09:37:32 +0000 |
commit | 47459d25eba62743d0933aec5682c65525af7d7a (patch) | |
tree | 3fa42627adc0ca9b855b3584a5a9d954b27cf6ad /libc | |
parent | 886546e0d49f35fcb83af49c96c7b2a8c5452b12 (diff) | |
download | uClibc-alpine-47459d25eba62743d0933aec5682c65525af7d7a.tar.bz2 uClibc-alpine-47459d25eba62743d0933aec5682c65525af7d7a.tar.xz |
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
Diffstat (limited to 'libc')
-rw-r--r-- | libc/stdio/printf.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 */ |