]> xenbits.xensource.com Git - libvirt.git/commitdiff
domain_capabilities: reformat virDomainCapsFeatureSEVFormat()
authorKristina Hanicova <khanicov@redhat.com>
Thu, 21 Jul 2022 10:45:47 +0000 (12:45 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 22 Jul 2022 10:56:57 +0000 (12:56 +0200)
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/conf/domain_capabilities.c

index bb36a956dbb4169f40c1bd0af8e45190aaef4151..6e8f957657913a25f945775c06b34aeefd4af7fa 100644 (file)
@@ -598,14 +598,12 @@ virDomainCapsFeatureSEVFormat(virBuffer *buf,
     virBufferAsprintf(buf, "<cbitpos>%d</cbitpos>\n", sev->cbitpos);
     virBufferAsprintf(buf, "<reducedPhysBits>%d</reducedPhysBits>\n",
                       sev->reduced_phys_bits);
-    virBufferAsprintf(buf, "<maxGuests>%d</maxGuests>\n",
-                      sev->max_guests);
-    virBufferAsprintf(buf, "<maxESGuests>%d</maxESGuests>\n",
-                      sev->max_es_guests);
-    if (sev->cpu0_id != NULL) {
-        virBufferAsprintf(buf, "<cpu0Id>%s</cpu0Id>\n",
-                          sev->cpu0_id);
-    }
+    virBufferAsprintf(buf, "<maxGuests>%d</maxGuests>\n", sev->max_guests);
+    virBufferAsprintf(buf, "<maxESGuests>%d</maxESGuests>\n", sev->max_es_guests);
+
+    if (sev->cpu0_id != NULL)
+        virBufferAsprintf(buf, "<cpu0Id>%s</cpu0Id>\n", sev->cpu0_id);
+
     virBufferAdjustIndent(buf, -2);
     virBufferAddLit(buf, "</sev>\n");
 }