[PATCH 3/7] util: sysinfo: Convert child buffers to use VIR_BUFFER_INIT_CHILD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the new helper to initialize child XML element buffers.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux