Use the new helper to initialize child XML element buffers.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/util/virsysinfo.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c
index 9d013067fe..d656b23731 100644
--- a/src/util/virsysinfo.c
+++ b/src/util/virsysinfo.c
@@ -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);
--
2.23.0