mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 13:17:51 +03:00
conf: Remove superfluous breaks
Remove superfluous breaks, as there is a "return" before them. Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
1031db3600
commit
6e0d14202b
@ -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;
|
||||
|
@ -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"));
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user