[PATCH v2 08/21] conf: Remove ATTRIBUTE_FALLTHROUGH from virDomainChrTargetDefFormat()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Formatting the <target/> element for serial devices will become a
bit more complicated later on, and leaving the fallthrough behavior
there would do nothing but complicate it further.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index cd9d384d3..9d6e06025 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -24007,14 +24007,18 @@ virDomainChrTargetDefFormat(virBufferPtr buf,
             return -1;
         }
 
+        virBufferAddLit(buf, "<target ");
+
         if (def->targetType != VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE) {
             virBufferAsprintf(buf,
-                              "<target type='%s' port='%d'/>\n",
-                              targetType,
-                              def->target.port);
-            break;
+                              "type='%s' ",
+                              targetType);
         }
-        ATTRIBUTE_FALLTHROUGH;
+
+        virBufferAsprintf(buf,
+                          "port='%d'/>\n",
+                          def->target.port);
+        break;
 
     case VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL:
         virBufferAsprintf(buf, "<target port='%d'/>\n",
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux