util: sysinfo: 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:
Peter Krempa 2019-10-30 12:40:06 +01:00
parent 107f7a2d16
commit 186e247b4c
1 changed files with 1 additions and 3 deletions

View File

@ -1482,7 +1482,7 @@ int
virSysinfoFormat(virBufferPtr buf, virSysinfoDefPtr def)
{
virBuffer attrBuf = VIR_BUFFER_INITIALIZER;
virBuffer childrenBuf = VIR_BUFFER_INITIALIZER;
virBuffer childrenBuf = VIR_BUFFER_INIT_CHILD(buf);
const char *type = virSysinfoTypeToString(def->type);
if (!type) {
@ -1493,8 +1493,6 @@ virSysinfoFormat(virBufferPtr buf, virSysinfoDefPtr def)
return -1;
}
virBufferSetChildIndent(&childrenBuf, buf);
virSysinfoBIOSFormat(&childrenBuf, def->bios);
virSysinfoSystemFormat(&childrenBuf, def->system);
virSysinfoBaseBoardFormat(&childrenBuf, def->baseBoard, def->nbaseBoard);