diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-23 23:57:20 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-23 23:57:20 +0100 |
commit | 13f514bef13ccc574839c624ca7106a92cbd5e3c (patch) | |
tree | a14fd690fbcf6540659188576c69ae295af5a063 /lib | |
parent | Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
parent | vsprintf: avoid misleading "(null)" for %px (diff) | |
download | linux-13f514bef13ccc574839c624ca7106a92cbd5e3c.tar.xz linux-13f514bef13ccc574839c624ca7106a92cbd5e3c.zip |
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. |