lkml.org 
[lkml]   [2018]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 07/11] vsprintf: Factor out %pV handler as va_format()
From
Date
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

\
 
 \ /
  Last update: 2018-04-25 16:57    [W:0.175 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site