qemu_capabilities: Indent <cpudata/> properly

When formatting qemuCaps XML, the <cpudata/> element is
misaligned. This is because it contains multiple lines and
virBufferAsprintf() does not expect that. Switch to
virBufferAddStr() which does.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
This commit is contained in:
Michal Privoznik 2022-07-19 13:58:53 +02:00
parent 9e8601c464
commit 4e39625095

View File

@ -4756,7 +4756,7 @@ virQEMUCapsFormatCache(virQEMUCaps *qemuCaps)
if (qemuCaps->cpuData) {
g_autofree char * cpudata = virCPUDataFormat(qemuCaps->cpuData);
virBufferAsprintf(&buf, "%s", cpudata);
virBufferAddStr(&buf, cpudata);
}
virBufferAsprintf(&buf, "<arch>%s</arch>\n",