lkml.org 
[lkml]   [2009]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] vsprintf: reduce code size, clean up
Date
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/

\
 
 \ /
  Last update: 2009-11-02 19:17    [W:1.878 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site