]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: eliminate hardcoded indent from network xml
authorLaine Stump <laine@laine.org>
Wed, 5 Mar 2014 11:55:51 +0000 (13:55 +0200)
committerLaine Stump <laine@laine.org>
Fri, 14 Mar 2014 04:40:39 +0000 (22:40 -0600)
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

index a73fbd661bfd398cbce5b5fa037f7c34590ad7c9..9be06d3ead9ad95ac2d2e86e8b43522ca2163694 100644 (file)
@@ -2797,17 +2797,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;