X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fvsprintf.c;h=98d632277ca8c932add9d0daf666dd1795c7f785;hb=813e0c46c9e2a0c6f0b6e774faac82afd7a2e812;hp=3b777025d8769e4ae07838ad12aa7f2d1b82240e;hpb=5f34fe1cfc1bdd8b4711bbe37421fba4ed0d1ed4;p=linux-2.6-omap-h63xx.git diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 3b777025d87..98d632277ca 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -661,6 +661,9 @@ static char *ip4_addr_string(char *buf, char *end, u8 *addr, int field_width, */ static char *pointer(const char *fmt, char *buf, char *end, void *ptr, int field_width, int precision, int flags) { + if (!ptr) + return string(buf, end, "(null)", field_width, precision, flags); + switch (*fmt) { case 'F': ptr = dereference_function_descriptor(ptr);