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
This commit is contained in:
Linus Torvalds 2018-02-23 14:57:20 -08:00
commit 13f514bef1

View file

@ -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.