]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Remove ATTRIBUTE_FALLTHROUGH from virDomainChrTargetDefFormat()
authorAndrea Bolognani <abologna@redhat.com>
Tue, 21 Nov 2017 12:03:19 +0000 (13:03 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 28 Nov 2017 14:46:32 +0000 (15:46 +0100)
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@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/conf/domain_conf.c

index 72d5f289c68e05556bf5a6a24e19329cb451060c..42e7596ac265684953389d1eea031bfcf8201244 100644 (file)
@@ -24019,14 +24019,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",