Re: [PATCH v2 01/11] lib/vsprintf: introduce put_one_char() for 3 line idiom

From: Rasmus Villemoes
Date: Mon Jan 18 2016 - 15:35:54 EST


On Thu, Jan 14 2016, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> There is an idiom used widely in the code
>
> if (buf < end)
> *buf = c;
> ++buf;
>
> Introduce put_one_char() helper as implementation of this idiom.
>

I suppose it does make the code a little more readable, but the current
idiom isn't that bad. Does it affect the generated code, and if so, does
it become smaller/larger, faster/slower?

Rasmus