diff options
author | Guillem Jover <guillem@hadrons.org> | 2011-08-30 03:09:41 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-08-31 00:48:14 +0200 |
commit | b580f5b65267608c9e634f1216b66de2a21549dc (patch) | |
tree | dd3e340edacbbe5349aec427c24d6008c79e7dba /linux | |
parent | 1e709eb6a8102937e90ba7cfdfc492be85ebdffc (diff) |
Honour type promotion on variable argument handling
* linux/dev/lib/vsprintf.c (linux_vsprintf): Use `int' when retrieving
a `short' through `va_arg'.
Diffstat (limited to 'linux')
-rw-r--r-- | linux/dev/lib/vsprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |