diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-03-09 21:15:04 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-10 13:15:06 +0100 |
commit | 39e874f8afbdb3745e2406ce4ecbde9ac4cbaa78 (patch) | |
tree | 7803af729748413da864811ebcc7a44cd98bbe52 /arch/x86/mm/k8topology_64.c | |
parent | fef20d9c1380f04ba9492d6463148db07b413708 (diff) | |
download | linux-39e874f8afbdb3745e2406ce4ecbde9ac4cbaa78.tar.gz linux-39e874f8afbdb3745e2406ce4ecbde9ac4cbaa78.tar.bz2 linux-39e874f8afbdb3745e2406ce4ecbde9ac4cbaa78.zip |
vsprintf: fix bug in negative value printing
Sitsofe Wheeler found and bisected that while unifying the
vsprintf format decoding in:
fef20d9: vsprintf: unify the format decoding layer for its 3 users
The sign flag has been dropped out in favour of
precise types (ie: LONG/ULONG).
But the format helper number() still needs this flag to keep track of
the signedness unless it will consider all numbers as unsigned.
Also add an explicit cast to int (for %d) while parsing with va_arg()
to ensure the highest bit is well extended on the 64 bits number that
hosts the value in case of negative values.
Reported-Bisected-Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <20090309201503.GA5010@nowhere>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/k8topology_64.c')
0 files changed, 0 insertions, 0 deletions