mirror of
https://github.com/systemd/systemd.git
synced 2025-02-04 21:47:31 +03:00
network: coding style fixes
This commit is contained in:
parent
55c6f705ba
commit
89346ac6f6
@ -117,7 +117,7 @@ static int netdev_l2tp_create_message_tunnel(NetDev *netdev, union in_addr_union
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
switch(t->l2tp_encap_type) {
|
||||
switch (t->l2tp_encap_type) {
|
||||
case NETDEV_L2TP_ENCAPTYPE_IP:
|
||||
encap_type = L2TP_ENCAPTYPE_IP;
|
||||
break;
|
||||
|
@ -337,7 +337,7 @@ int config_parse_dhcp_or_ra_route_metric(
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch(ltype) {
|
||||
switch (ltype) {
|
||||
case AF_INET:
|
||||
network->dhcp_route_metric = metric;
|
||||
network->dhcp_route_metric_set = true;
|
||||
@ -388,7 +388,7 @@ int config_parse_dhcp_use_dns(
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch(ltype) {
|
||||
switch (ltype) {
|
||||
case AF_INET:
|
||||
network->dhcp_use_dns = r;
|
||||
network->dhcp_use_dns_set = true;
|
||||
@ -439,7 +439,7 @@ int config_parse_dhcp_use_domains(
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch(ltype) {
|
||||
switch (ltype) {
|
||||
case AF_INET:
|
||||
network->dhcp_use_domains = d;
|
||||
network->dhcp_use_domains_set = true;
|
||||
@ -490,7 +490,7 @@ int config_parse_dhcp_use_ntp(
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch(ltype) {
|
||||
switch (ltype) {
|
||||
case AF_INET:
|
||||
network->dhcp_use_ntp = r;
|
||||
network->dhcp_use_ntp_set = true;
|
||||
@ -542,7 +542,7 @@ int config_parse_dhcp_or_ra_route_table(
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch(ltype) {
|
||||
switch (ltype) {
|
||||
case AF_INET:
|
||||
network->dhcp_route_table = rt;
|
||||
network->dhcp_route_table_set = true;
|
||||
@ -777,7 +777,7 @@ int config_parse_dhcp_send_option(
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch(type) {
|
||||
switch (type) {
|
||||
case DHCP_OPTION_DATA_UINT8:{
|
||||
r = safe_atou8(p, &uint8_data);
|
||||
if (r < 0) {
|
||||
|
@ -117,7 +117,7 @@ static void ipv4ll_handler(sd_ipv4ll *ll, int event, void *userdata) {
|
||||
if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
|
||||
return;
|
||||
|
||||
switch(event) {
|
||||
switch (event) {
|
||||
case SD_IPV4LL_EVENT_STOP:
|
||||
r = ipv4ll_address_lost(link);
|
||||
if (r < 0) {
|
||||
|
@ -1220,7 +1220,7 @@ int config_parse_nexthop_family(
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch(a) {
|
||||
switch (a) {
|
||||
case ADDRESS_FAMILY_IPV4:
|
||||
n->family = AF_INET;
|
||||
break;
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "networkd-setlink.h"
|
||||
|
||||
static void request_free_object(RequestType type, void *object) {
|
||||
switch(type) {
|
||||
switch (type) {
|
||||
case REQUEST_TYPE_ACTIVATE_LINK:
|
||||
break;
|
||||
case REQUEST_TYPE_ADDRESS:
|
||||
@ -100,7 +100,7 @@ static void request_hash_func(const Request *req, struct siphash *state) {
|
||||
siphash24_compress(&req->link->ifindex, sizeof(req->link->ifindex), state);
|
||||
siphash24_compress(&req->type, sizeof(req->type), state);
|
||||
|
||||
switch(req->type) {
|
||||
switch (req->type) {
|
||||
case REQUEST_TYPE_ACTIVATE_LINK:
|
||||
break;
|
||||
case REQUEST_TYPE_ADDRESS:
|
||||
@ -140,10 +140,9 @@ static void request_hash_func(const Request *req, struct siphash *state) {
|
||||
case REQUEST_TYPE_ROUTING_POLICY_RULE:
|
||||
routing_policy_rule_hash_func(req->rule, state);
|
||||
break;
|
||||
case REQUEST_TYPE_SET_LINK: {
|
||||
case REQUEST_TYPE_SET_LINK:
|
||||
trivial_hash_func(req->set_link_operation_ptr, state);
|
||||
break;
|
||||
}
|
||||
case REQUEST_TYPE_UP_DOWN:
|
||||
break;
|
||||
default:
|
||||
@ -296,7 +295,7 @@ int manager_process_requests(sd_event_source *s, void *userdata) {
|
||||
Request *req;
|
||||
|
||||
ORDERED_SET_FOREACH(req, manager->request_queue) {
|
||||
switch(req->type) {
|
||||
switch (req->type) {
|
||||
case REQUEST_TYPE_ACTIVATE_LINK:
|
||||
r = request_process_activation(req);
|
||||
break;
|
||||
|
@ -132,7 +132,7 @@ int manager_genl_process_nl80211_config(sd_netlink *genl, sd_netlink_message *me
|
||||
strna(nl80211_cmd_to_string(cmd)), cmd,
|
||||
strna(nl80211_iftype_to_string(wlan_iftype)), strna(ssid));
|
||||
|
||||
switch(cmd) {
|
||||
switch (cmd) {
|
||||
case NL80211_CMD_SET_INTERFACE:
|
||||
case NL80211_CMD_NEW_INTERFACE:
|
||||
link->wlan_iftype = wlan_iftype;
|
||||
@ -200,7 +200,7 @@ int manager_genl_process_nl80211_mlme(sd_netlink *genl, sd_netlink_message *mess
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch(cmd) {
|
||||
switch (cmd) {
|
||||
case NL80211_CMD_NEW_STATION:
|
||||
case NL80211_CMD_DEL_STATION: {
|
||||
struct ether_addr bssid;
|
||||
|
@ -18,7 +18,7 @@ static int fifo_fill_message(Link *link, QDisc *qdisc, sd_netlink_message *req)
|
||||
assert(qdisc);
|
||||
assert(req);
|
||||
|
||||
switch(qdisc->kind) {
|
||||
switch (qdisc->kind) {
|
||||
case QDISC_KIND_PFIFO:
|
||||
assert_se(fifo = PFIFO(qdisc));
|
||||
break;
|
||||
@ -71,7 +71,7 @@ int config_parse_pfifo_size(
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch(qdisc->kind) {
|
||||
switch (qdisc->kind) {
|
||||
case QDISC_KIND_PFIFO:
|
||||
fifo = PFIFO(qdisc);
|
||||
break;
|
||||
|
@ -25,7 +25,7 @@ static int traffic_control_configure(Link *link, TrafficControl *tc) {
|
||||
assert(link);
|
||||
assert(tc);
|
||||
|
||||
switch(tc->kind) {
|
||||
switch (tc->kind) {
|
||||
case TC_KIND_QDISC:
|
||||
return qdisc_configure(link, TC_TO_QDISC(tc));
|
||||
case TC_KIND_TCLASS:
|
||||
@ -66,7 +66,7 @@ int link_configure_traffic_control(Link *link) {
|
||||
static int traffic_control_section_verify(TrafficControl *tc, bool *qdisc_has_root, bool *qdisc_has_clsact) {
|
||||
assert(tc);
|
||||
|
||||
switch(tc->kind) {
|
||||
switch (tc->kind) {
|
||||
case TC_KIND_QDISC:
|
||||
return qdisc_section_verify(TC_TO_QDISC(tc), qdisc_has_root, qdisc_has_clsact);
|
||||
case TC_KIND_TCLASS:
|
||||
|
Loading…
x
Reference in New Issue
Block a user