Skip to content

Commit 13f514b

Browse files
committed
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
2 parents 938e142 + 3a129cc commit 13f514b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/vsprintf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1849,7 +1849,7 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
18491849
{
18501850
const int default_width = 2 * sizeof(void *);
18511851

1852-
if (!ptr && *fmt != 'K') {
1852+
if (!ptr && *fmt != 'K' && *fmt != 'x') {
18531853
/*
18541854
* Print (null) with the same width as a pointer so it makes
18551855
* tabular output look nice.

0 commit comments

Comments
 (0)