Messages in this thread | | | Subject | Re: [PATCH v5 07/11] vsprintf: Factor out %pV handler as va_format() | From | Andy Shevchenko <> | Date | Wed, 25 Apr 2018 17:56:34 +0300 |
| |
On Wed, 2018-04-25 at 13:12 +0200, Petr Mladek wrote: > Move the code from the long pointer() function. We are going to add a > check > for the access to the address that will make it even more complicated. > > This patch does not change the existing behavior.
> +static char *va_format(char *buf, char *end, struct va_format > *va_fmt) > +{ > + va_list va; > + > + va_copy(va, *va_fmt->va);
> + buf += vsnprintf(buf, end > buf ? end - buf : 0, > + va_fmt->fmt, va);
One line?
> + va_end(va); > + > + return buf; > +}
-- Andy Shevchenko <andriy.shevchenko@linux.intel.com> Intel Finland Oy
| |