From: Andrea Bolognani Date: Tue, 21 Nov 2017 12:03:19 +0000 (+0100) Subject: conf: Remove ATTRIBUTE_FALLTHROUGH from virDomainChrTargetDefFormat() X-Git-Tag: v3.10.0-rc1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7983068fa50ea5222e62b24ea912a529994276f0;p=thirdparty%2Flibvirt.git conf: Remove ATTRIBUTE_FALLTHROUGH from virDomainChrTargetDefFormat() Formatting the 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 Reviewed-by: Pavel Hrdina --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 72d5f289c6..42e7596ac2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -24019,14 +24019,18 @@ virDomainChrTargetDefFormat(virBufferPtr buf, return -1; } + virBufferAddLit(buf, "targetType != VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE) { virBufferAsprintf(buf, - "\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, "\n",