mirror of https://gitee.com/openkylin/libvirt.git
util: buffer: Tolerate NULL 'buf' in virBufferStrcat
Most other buffer APIs tolerate the buffer being NULL. Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
3f9e02b40a
commit
9be9e26b74
|
@ -883,6 +883,9 @@ virBufferStrcat(virBufferPtr buf, ...)
|
|||
{
|
||||
va_list ap;
|
||||
|
||||
if (!buf)
|
||||
return;
|
||||
|
||||
va_start(ap, buf);
|
||||
virBufferStrcatVArgs(buf, ap);
|
||||
va_end(ap);
|
||||
|
|
Loading…
Reference in New Issue