提交 186e247b 编写于 作者: P Peter Krempa

util: sysinfo: Convert child buffers to use VIR_BUFFER_INIT_CHILD

Use the new helper to initialize child XML element buffers.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 107f7a2d
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册