libc/vsprintf_internal: Call va_copy just like vsyslog
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
82813472d1
commit
1e607a70bc
@ -464,7 +464,15 @@ static int vsprintf_internal(FAR struct lib_outstream_s *stream,
|
|||||||
if (fmt_char(fmt) == 'V')
|
if (fmt_char(fmt) == 'V')
|
||||||
{
|
{
|
||||||
FAR struct va_format *vaf = va_arg(ap, void *);
|
FAR struct va_format *vaf = va_arg(ap, void *);
|
||||||
|
#ifdef va_copy
|
||||||
|
va_list copy;
|
||||||
|
|
||||||
|
va_copy(copy, *vaf->va);
|
||||||
|
vsprintf_internal(stream, NULL, 0, vaf->fmt, copy);
|
||||||
|
va_end(copy);
|
||||||
|
#else
|
||||||
vsprintf_internal(stream, NULL, 0, vaf->fmt, *vaf->va);
|
vsprintf_internal(stream, NULL, 0, vaf->fmt, *vaf->va);
|
||||||
|
#endif
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user