Messages in this thread | | | From | Andreas Schwab <> | Subject | Re: [PATCH] vsprintf: reduce code size, clean up | Date | Mon, 02 Nov 2009 19:13:47 +0100 |
| |
Frederic Weisbecker <fweisbec@gmail.com> writes:
> On Sun, Nov 01, 2009 at 03:01:40PM -0200, André Goddard Rosa wrote: >> @@ -822,30 +825,34 @@ static char *pointer(const char *fmt, char *buf, >> char *end, void *ptr, >> struct printf_spec spec) >> { >> if (!ptr) >> - return string(buf, end, "(null)", spec); >> + return string(buf, end, null, spec); >> >> - switch (*fmt) { >> - case 'F': >> + switch (TOLOWER(*fmt)) { >> case 'f': >> + /* or case 'F' */ >> ptr = dereference_function_descriptor(ptr); >> - case 's': >> /* Fallthrough */ >> - case 'S': >> + case 's': >> + /* or case 'S' */ >> return symbol_string(buf, end, ptr, spec, *fmt); >> case 'R': >> return resource_string(buf, end, ptr, spec); > > > > What happens if we have %pr ? > It will behave like %pR but it shouldn't.
%pR does not work any more anyway. :-)
Andreas.
-- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |