Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

From: Rasmus Villemoes
Date: Mon Dec 28 2015 - 17:21:04 EST


On Mon, Dec 28 2015, Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> wrote:

>
> Is there any aspect of the passed-through printf_spec which isn't
> overridden in xnumber? The users are/will be various %p extensions,
> which probably means that no-one passes a non-default precision (gcc
> complains about %.*p), and the remaining possible flags (PLUS, LEFT,
> SPACE) are useless and/or impossible to pass to %p

Actually, LEFT can be passed to %p (or get set by passing a negative
field width via %*p), which would be actively harmful: When LEFT is set,
number() explicitly removes the ZEROPAD flag, so we'd get "0xabcdef "
instead of "0x00abcdef".
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/