diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-24 01:57:20 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-24 01:57:20 +0300 |
commit | 13f514bef13ccc574839c624ca7106a92cbd5e3c (patch) | |
tree | a14fd690fbcf6540659188576c69ae295af5a063 /lib | |
parent | 938e1426e262bb0f2b512054a6f9d435dc8bd67a (diff) | |
parent | 3a129cc2151425e5aeb69aeb25fbc994ec738137 (diff) | |
download | linux-13f514bef13ccc574839c624ca7106a92cbd5e3c.tar.xz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk
Pull printk fixlet from Petr Mladek:
"People expect to see the real pointer value for %px.
Let's substitute '(null)' only for the other %p? format modifiers that
need to deference the pointer"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk:
vsprintf: avoid misleading "(null)" for %px
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vsprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 77ee6ced11b1..d7a708f82559 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1849,7 +1849,7 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, { const int default_width = 2 * sizeof(void *); - if (!ptr && *fmt != 'K') { + if (!ptr && *fmt != 'K' && *fmt != 'x') { /* * Print (null) with the same width as a pointer so it makes * tabular output look nice. |