diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-04-06 21:17:05 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-04-06 21:17:05 +0200 |
commit | d62085e5c5eb47cc2442899b125c799cb90e6d7b (patch) | |
tree | 7c58aeb243465be33d07a341130c4dc9bbcfbba7 /ddb | |
parent | 71f231da83fdd75deab3ce1b8643da50b6f574f5 (diff) |
Do not take address of va_list variable
This breaks on x86_64, where it is an array and thus gets bogus results.
* ddb/db_output.c (db_printf, kdbprintf): Pass copy of va_list variable instead
of its address.
* kern/debug.c (panic, log): Likewise.
* kern/printf.c (vprintf, iprintf, sprintf, vsnprintf): Likewise.
(_doprnt): Take va_list instead of va_list *, fix usage and comment accordingly.
* kern/printf.h (_doprnt): Take va_list instead of va_list *.
Diffstat (limited to 'ddb')
-rw-r--r-- | ddb/db_output.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ddb/db_output.c b/ddb/db_output.c index 57d6856..3ea2caa 100644 --- a/ddb/db_output.c +++ b/ddb/db_output.c @@ -213,7 +213,7 @@ db_printf(const char *fmt, ...) db_printf_enter(); /* optional multiP serialization */ #endif va_start(listp, fmt); - _doprnt(fmt, &listp, db_id_putc, db_radix, 0); + _doprnt(fmt, listp, db_id_putc, db_radix, 0); va_end(listp); } @@ -225,7 +225,7 @@ kdbprintf(const char *fmt, ...) { va_list listp; va_start(listp, fmt); - _doprnt(fmt, &listp, db_id_putc, db_radix, 0); + _doprnt(fmt, listp, db_id_putc, db_radix, 0); va_end(listp); } |