mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
conf: cpu: Convert child buffers to use VIR_BUFFER_INIT_CHILD
Use the new helper to initialize child XML element buffers. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
4a0ccab772
commit
619fac2ea6
@ -683,7 +683,7 @@ virCPUDefFormatBufFull(virBufferPtr buf,
|
||||
{
|
||||
int ret = -1;
|
||||
virBuffer attributeBuf = VIR_BUFFER_INITIALIZER;
|
||||
virBuffer childrenBuf = VIR_BUFFER_INITIALIZER;
|
||||
virBuffer childrenBuf = VIR_BUFFER_INIT_CHILD(buf);
|
||||
|
||||
if (!def)
|
||||
return 0;
|
||||
@ -718,7 +718,6 @@ virCPUDefFormatBufFull(virBufferPtr buf,
|
||||
}
|
||||
|
||||
/* Format children */
|
||||
virBufferSetChildIndent(&childrenBuf, buf);
|
||||
if (def->type == VIR_CPU_TYPE_HOST && def->arch)
|
||||
virBufferAsprintf(&childrenBuf, "<arch>%s</arch>\n",
|
||||
virArchToString(def->arch));
|
||||
|
Loading…
x
Reference in New Issue
Block a user