The function was basically open-coding it.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/cpu_conf.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index 7778e01131..5cf7716b12 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -743,21 +743,7 @@ virCPUDefFormatBufFull(virBufferPtr buf,
if (virDomainNumaDefFormatXML(&childrenBuf, numa) < 0)
return -1;
- /* Put it all together */
- if (virBufferUse(&attributeBuf) || virBufferUse(&childrenBuf)) {
- virBufferAddLit(buf, "<cpu");
-
- if (virBufferUse(&attributeBuf))
- virBufferAddBuffer(buf, &attributeBuf);
-
- if (virBufferUse(&childrenBuf)) {
- virBufferAddLit(buf, ">\n");
- virBufferAddBuffer(buf, &childrenBuf);
- virBufferAddLit(buf, "</cpu>\n");
- } else {
- virBufferAddLit(buf, "/>\n");
- }
- }
+ virXMLFormatElement(buf, "cpu", &attributeBuf, &childrenBuf);
return 0;
}
--
2.26.2