projects/linux·commit 13f514be

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk

13f514be · Linus Torvalds <[email protected]> · 2018-02-23 14:57:20 -08:00

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
Commit
13f514bef13ccc574839c624ca7106a92cbd5e3c
Parents
938e1426 · 3a129cc2

Merge commit. Changes below are compared with the first parent: 938e1426.

Changes

1 files changed · +1 −1

FileStatusAddDelContent
lib/vsprintf.cmodified+1−1View file

lib/vsprintf.c

View file
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 77ee6ce..d7a708f 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.