[libvirt] [PATCH 3/9] conf: eliminate hardcoded indent from network xml

Laine Stump laine at laine.org
Thu Mar 6 15:24:26 UTC 2014


This was very simple, since the only place that had hardcoded
indentation was a few items in the network status xml.
---
 src/conf/network_conf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index bac0465..1d5781e 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -2806,17 +2806,17 @@ virNetworkObjFormat(virNetworkObjPtr net,
         goto no_memory;
 
     virBufferAddLit(&buf, "<networkstatus>\n");
-    virBufferAsprintf(&buf, "  <class_id bitmap='%s'/>\n", class_id);
-    virBufferAsprintf(&buf, "  <floor sum='%llu'/>\n", net->floor_sum);
+    virBufferAdjustIndent(&buf, 2);
+    virBufferAsprintf(&buf, "<class_id bitmap='%s'/>\n", class_id);
+    virBufferAsprintf(&buf, "<floor sum='%llu'/>\n", net->floor_sum);
     VIR_FREE(class_id);
 
     for (i = 0; i < VIR_NETWORK_TAINT_LAST; i++) {
         if (net->taint & (1 << i))
-            virBufferAsprintf(&buf, "  <taint flag='%s'/>\n",
+            virBufferAsprintf(&buf, "<taint flag='%s'/>\n",
                               virNetworkTaintTypeToString(i));
     }
 
-    virBufferAdjustIndent(&buf, 2);
     if (virNetworkDefFormatBuf(&buf, net->def, flags) < 0)
         goto error;
 
-- 
1.8.5.3




More information about the libvir-list mailing list