Re: [PATCH 1/2] remove all uses of printf's %n

From: Joe Perches
Date: Mon Sep 16 2013 - 12:13:23 EST


On Mon, 2013-09-16 at 12:07 -0400, George Spelvin wrote:
> it gave me an idea. We could put this padding logic straight
> into vsprintf and clean up all the callers.
[]
> Since the only pad character currently used is space, we could omit the
> argument and use something like %127%, but gcc gets even more confused
> by that.
>
> The code is easy enough. But any suggestions for ways to represent it
> in the format string would be appreciated.

%*p<new_type><pad_char> (space assumed if not existing)

--
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/