From: Liao Pingfang <liao.pingfang@xxxxxxxxxx> Remove superfluous breaks, as there is a "return" before them. Signed-off-by: Liao Pingfang <liao.pingfang@xxxxxxxxxx> Signed-off-by: Yi Wang <wang.yi59@xxxxxxxxxx> --- 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 bcebfc6..355aa74 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); @@ -8425,7 +8423,6 @@ virDomainHostdevSubsysSCSIVHostDefParseXML(xmlNodePtr sourcenode, _("Invalid hostdev protocol '%s'"), virDomainHostdevSubsysSCSIHostProtocolTypeToString(hostsrc->protocol)); return -1; - break; } return 0; @@ -18139,13 +18136,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: @@ -18163,7 +18158,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 0fd68a7..4221623 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 b0d60ab..f2ec080 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; } -- 2.9.5