From: Ben Pfaff Date: Sat, 11 Sep 2004 23:18:06 +0000 (+0000) Subject: Format null pointers as 0x0. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=404ff9b49909b1648cef613e66d2c54a345e72ad;p=pintos-anon Format null pointers as 0x0. --- diff --git a/src/lib/stdio.c b/src/lib/stdio.c index 6a03f53..95dfdbe 100644 --- a/src/lib/stdio.c +++ b/src/lib/stdio.c @@ -293,14 +293,11 @@ __vprintf (const char *format, va_list args, case 'p': { /* Pointer conversion. - Format non-null pointers as %#x. */ + Format pointers as %#x. */ void *p = va_arg (args, void *); c.flags = POUND; - if (p != NULL) - format_integer ((uintptr_t) p, false, &base_x, &c, output, aux); - else - format_string ("(nil)", 5, &c, output, aux); + format_integer ((uintptr_t) p, false, &base_x, &c, output, aux); } break;