summaryrefslogtreecommitdiff
path: root/src/network/networkd-brvlan.c
diff options
context:
space:
mode:
authorTobias Jungel <Tobias.Jungel@gmail.com>2016-06-12 19:59:21 +0200
committerLennart Poettering <lennart@poettering.net>2016-06-12 19:59:21 +0200
commitceac40781befe3b47141fea2e445258de572952f (patch)
treedf32443ed40811a68bb3ed348502568ce778b264 /src/network/networkd-brvlan.c
parentf045931a733c06252c6aaa845adac0bb56e2b9c0 (diff)
networkd: cleanup of bridge vlan code (#3505)
cleanup minor nitpicks mentioned in #3428
Diffstat (limited to 'src/network/networkd-brvlan.c')
-rw-r--r--src/network/networkd-brvlan.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
index 77c08d090c..f621b8011b 100644
--- a/src/network/networkd-brvlan.c
+++ b/src/network/networkd-brvlan.c
@@ -39,12 +39,6 @@ static inline void set_bit(unsigned nr, uint32_t *addr) {
addr[nr / 32] |= (((uint32_t) 1) << (nr % 32));
}
-static inline int is_vid_valid(unsigned vid) {
- if (vid > VLANID_MAX || vid == 0)
- return -EINVAL;
- return 0;
-}
-
static int find_next_bit(int i, uint32_t x) {
int j;
@@ -240,21 +234,21 @@ static int parse_vid_range(const char *rvalue, uint16_t *vid, uint16_t *vid_end)
if (r < 0)
return r;
- if (!_vid)
+ if (_vid == 0)
return -ERANGE;
r = parse_vlanid(p, &_vid_end);
if (r < 0)
return r;
- if (!_vid_end)
+ if (_vid_end == 0)
return -ERANGE;
} else {
r = parse_vlanid(_rvalue, &_vid);
if (r < 0)
return r;
- if (!_vid)
+ if (_vid == 0)
return -ERANGE;
}