summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-05-07 07:03:28 -0400
committerLennart Poettering <lennart@poettering.net>2017-05-07 07:03:28 -0400
commitab8ee0f2591acff485c03be69ca508154fd2628a (patch)
treec182d98befcf04e46a34c80dca7c3aaf59d7d33c /src/network
parentf7bf1abef9b4db7ffe18a6cf84db2aaef7d908d3 (diff)
downloadsystemd-ab8ee0f2591acff485c03be69ca508154fd2628a.tar.gz
tree-wide: use SET_FLAG in more places (#5892)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/netdev/vlan.c6
-rw-r--r--src/network/networkd-route.c5
2 files changed, 2 insertions, 9 deletions
diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c
index 718b627b2b..60d6343021 100644
--- a/src/network/netdev/vlan.c
+++ b/src/network/netdev/vlan.c
@@ -42,11 +42,7 @@ static int netdev_vlan_fill_message_create(NetDev *netdev, Link *link, sd_netlin
if (v->gvrp != -1) {
flags.mask |= VLAN_FLAG_GVRP;
-
- if (v->gvrp)
- flags.flags |= VLAN_FLAG_GVRP;
- else
- flags.flags &= ~VLAN_FLAG_GVRP;
+ SET_FLAG(flags.flags, VLAN_FLAG_GVRP, v->gvrp);
}
r = sd_netlink_message_append_data(req, IFLA_VLAN_FLAGS, &flags, sizeof(struct ifla_vlan_flags));
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 94204bddd0..ff93fe4a04 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -973,10 +973,7 @@ int config_parse_gateway_onlink(const char *unit,
return 0;
}
- if (r)
- n->flags |= RTNH_F_ONLINK;
- else
- n->flags &= ~RTNH_F_ONLINK;
+ SET_FLAG(n->flags, RTNH_F_ONLINK, r);
n = NULL;
return 0;