From b580f5b65267608c9e634f1216b66de2a21549dc Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 30 Aug 2011 03:09:41 +0200 Subject: Honour type promotion on variable argument handling * linux/dev/lib/vsprintf.c (linux_vsprintf): Use `int' when retrieving a `short' through `va_arg'. --- linux/dev/lib/vsprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/dev/lib/vsprintf.c') diff --git a/linux/dev/lib/vsprintf.c b/linux/dev/lib/vsprintf.c index 0beb747..541ec65 100644 --- a/linux/dev/lib/vsprintf.c +++ b/linux/dev/lib/vsprintf.c @@ -328,9 +328,9 @@ linux_vsprintf (char *buf, const char *fmt, va_list args) num = va_arg (args, unsigned long); else if (qualifier == 'h') if (flags & SIGN) - num = va_arg (args, short); + num = (short) va_arg (args, int); else - num = va_arg (args, unsigned short); + num = (unsigned short) va_arg (args, unsigned int); else if (flags & SIGN) num = va_arg (args, int); else -- cgit v1.2.3