tree-wide: drop unnecessary break in default branch

This commit is contained in:
Yu Watanabe
2025-03-06 11:42:20 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent c65f40b1a1
commit 5c9feb2d6e
64 changed files with 43 additions and 133 deletions
-2
View File
@@ -125,7 +125,6 @@ static int netdev_l2tp_create_message_tunnel(NetDev *netdev, union in_addr_union
case NETDEV_L2TP_ENCAPTYPE_UDP:
default:
encap_type = L2TP_ENCAPTYPE_UDP;
break;
}
r = sd_netlink_message_append_u16(m, L2TP_ATTR_ENCAP_TYPE, encap_type);
@@ -227,7 +226,6 @@ static int netdev_l2tp_create_message_session(NetDev *netdev, L2tpSession *sessi
default:
l2_spec_type = L2TP_L2SPECTYPE_DEFAULT;
l2_spec_len = 4;
break;
}
r = sd_netlink_message_append_u8(m, L2TP_ATTR_L2SPEC_TYPE, l2_spec_type);
-1
View File
@@ -574,7 +574,6 @@ static int netdev_ip6tnl_fill_message_create(NetDev *netdev, Link *link, sd_netl
case NETDEV_IP6_TNL_MODE_ANYIP6:
default:
proto = 0;
break;
}
r = sd_netlink_message_append_u8(m, IFLA_IPTUN_PROTO, proto);
+2 -4
View File
@@ -472,8 +472,7 @@ void address_hash_func(const Address *a, struct siphash *state) {
break;
default:
/* treat any other address family as AF_UNSPEC */
break;
assert_not_reached();
}
}
@@ -515,8 +514,7 @@ int address_compare_func(const Address *a1, const Address *a2) {
return r;
default:
/* treat any other address family as AF_UNSPEC */
return 0;
assert_not_reached();
}
}
-1
View File
@@ -293,7 +293,6 @@ static int bridge_mdb_verify(BridgeMDB *mdb) {
"%s: MulticastGroupAddress= is the multicast all nodes address. "
"Ignoring [BridgeMDB] section from line %u.",
mdb->section->filename, mdb->section->line);
break;
}
break;
default:
-1
View File
@@ -1284,7 +1284,6 @@ static int dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) {
log_link_warning_errno(link, event, "DHCP error: Client failed: %m");
else
log_link_warning(link, "DHCP unknown event: %i", event);
break;
}
return 0;
-1
View File
@@ -156,7 +156,6 @@ static void ipv4ll_handler(sd_ipv4ll *ll, int event, void *userdata) {
break;
default:
log_link_warning(link, "IPv4 link-local unknown event: %d", event);
break;
}
}
+2 -4
View File
@@ -121,8 +121,7 @@ static void route_hash_func(const Route *route, struct siphash *state) {
break;
default:
/* treat any other address family as AF_UNSPEC */
break;
assert_not_reached();
}
}
@@ -209,8 +208,7 @@ static int route_compare_func(const Route *a, const Route *b) {
return route_nexthops_compare_func(a, b);
default:
/* treat any other address family as AF_UNSPEC */
return 0;
assert_not_reached();
}
}
+2 -2
View File
@@ -641,10 +641,10 @@ static int link_is_ready_to_set_link(Link *link, Request *req) {
return -EALREADY; /* Not necessary to set the same value. */
req->userdata = UINT32_TO_PTR(mtu);
return true;
break;
}
default:
break;
;
}
return true;