From 6e0d14202b756e3c890bb3d9ebe8e1ef617c56cc Mon Sep 17 00:00:00 2001 From: Liao Pingfang Date: Fri, 17 Jul 2020 10:00:09 +0800 Subject: [PATCH] conf: Remove superfluous breaks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove superfluous breaks, as there is a "return" before them. Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang Reviewed-by: Daniel Henrique Barboza Reviewed-by: Ján Tomko Signed-off-by: Ján Tomko --- src/conf/domain_conf.c | 6 ------ src/conf/network_conf.c | 12 ------------ src/conf/nwfilter_params.c | 4 ---- 3 files changed, 22 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7ecd2818b9..8d328819af 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1840,7 +1840,6 @@ const char *virDomainInputDefGetPath(virDomainInputDefPtr input) case VIR_DOMAIN_INPUT_TYPE_KBD: case VIR_DOMAIN_INPUT_TYPE_LAST: return NULL; - break; case VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH: return input->source.evdev; @@ -2728,7 +2727,6 @@ virDomainChrSourceDefIsEqual(const virDomainChrSourceDef *src, case VIR_DOMAIN_CHR_TYPE_DEV: case VIR_DOMAIN_CHR_TYPE_PIPE: return STREQ_NULLABLE(src->data.file.path, tgt->data.file.path); - break; case VIR_DOMAIN_CHR_TYPE_NMDM: return STREQ_NULLABLE(src->data.nmdm.master, tgt->data.nmdm.master) && STREQ_NULLABLE(src->data.nmdm.slave, tgt->data.nmdm.slave); @@ -8439,7 +8437,6 @@ virDomainHostdevSubsysSCSIVHostDefParseXML(xmlNodePtr sourcenode, _("Invalid hostdev protocol '%s'"), virDomainHostdevSubsysSCSIHostProtocolTypeToString(hostsrc->protocol)); return -1; - break; } return 0; @@ -18155,13 +18152,11 @@ virDomainChrEquals(virDomainChrDefPtr src, case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_XEN: case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO: return STREQ_NULLABLE(src->target.name, tgt->target.name); - break; case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD: if (!src->target.addr || !tgt->target.addr) return src->target.addr == tgt->target.addr; return memcmp(src->target.addr, tgt->target.addr, sizeof(*src->target.addr)) == 0; - break; case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_NONE: case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_LAST: @@ -18179,7 +18174,6 @@ virDomainChrEquals(virDomainChrDefPtr src, case VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE: case VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL: return src->target.port == tgt->target.port; - break; case VIR_DOMAIN_CHR_DEVICE_TYPE_LAST: /* shouldn't happen */ break; diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 0fd68a7d66..4221623c37 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -3682,48 +3682,36 @@ virNetworkDefUpdateSection(virNetworkDefPtr def, switch (section) { case VIR_NETWORK_SECTION_BRIDGE: return virNetworkDefUpdateBridge(def, command, parentIndex, ctxt, flags); - break; case VIR_NETWORK_SECTION_DOMAIN: return virNetworkDefUpdateDomain(def, command, parentIndex, ctxt, flags); - break; case VIR_NETWORK_SECTION_IP: return virNetworkDefUpdateIP(def, command, parentIndex, ctxt, flags); - break; case VIR_NETWORK_SECTION_IP_DHCP_HOST: return virNetworkDefUpdateIPDHCPHost(def, command, parentIndex, ctxt, flags); - break; case VIR_NETWORK_SECTION_IP_DHCP_RANGE: return virNetworkDefUpdateIPDHCPRange(def, command, parentIndex, ctxt, flags); - break; case VIR_NETWORK_SECTION_FORWARD: return virNetworkDefUpdateForward(def, command, parentIndex, ctxt, flags); - break; case VIR_NETWORK_SECTION_FORWARD_INTERFACE: return virNetworkDefUpdateForwardInterface(def, command, parentIndex, ctxt, flags); - break; case VIR_NETWORK_SECTION_FORWARD_PF: return virNetworkDefUpdateForwardPF(def, command, parentIndex, ctxt, flags); - break; case VIR_NETWORK_SECTION_PORTGROUP: return virNetworkDefUpdatePortGroup(def, command, parentIndex, ctxt, flags); - break; case VIR_NETWORK_SECTION_DNS_HOST: return virNetworkDefUpdateDNSHost(def, command, parentIndex, ctxt, flags); - break; case VIR_NETWORK_SECTION_DNS_TXT: return virNetworkDefUpdateDNSTxt(def, command, parentIndex, ctxt, flags); - break; case VIR_NETWORK_SECTION_DNS_SRV: return virNetworkDefUpdateDNSSrv(def, command, parentIndex, ctxt, flags); - break; default: virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", _("can't update unrecognized section of network")); diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c index b0d60abdd0..f2ec08012a 100644 --- a/src/conf/nwfilter_params.c +++ b/src/conf/nwfilter_params.c @@ -169,10 +169,8 @@ virNWFilterVarValueGetCardinality(const virNWFilterVarValue *val) switch (val->valType) { case NWFILTER_VALUE_TYPE_SIMPLE: return 1; - break; case NWFILTER_VALUE_TYPE_ARRAY: return val->u.array.nValues; - break; case NWFILTER_VALUE_TYPE_LAST: return 0; } @@ -853,10 +851,8 @@ virNWFilterVarAccessEqual(const virNWFilterVarAccess *a, case VIR_NWFILTER_VAR_ACCESS_ELEMENT: return (a->u.index.idx == b->u.index.idx && a->u.index.intIterId == b->u.index.intIterId); - break; case VIR_NWFILTER_VAR_ACCESS_ITERATOR: return a->u.iterId == b->u.iterId; - break; case VIR_NWFILTER_VAR_ACCESS_LAST: break; }