]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: simplify dhcp6_get_prefix_delegation()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 28 Nov 2018 19:48:34 +0000 (20:48 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 2 Dec 2018 05:23:45 +0000 (06:23 +0100)
src/network/networkd-dhcp6.c

index 40b8780e5697d1a9b524093785c4a6b80c598d5f..aebc070b9ef56e005240921b0e71b9f845dba486 100644 (file)
@@ -24,13 +24,9 @@ static bool dhcp6_get_prefix_delegation(Link *link) {
         if (!link->network)
                 return false;
 
-        if (!IN_SET(link->network->router_prefix_delegation,
-                            RADV_PREFIX_DELEGATION_DHCP6,
-                            RADV_PREFIX_DELEGATION_BOTH)) {
-                return false;
-        }
-
-        return true;
+        return IN_SET(link->network->router_prefix_delegation,
+                      RADV_PREFIX_DELEGATION_DHCP6,
+                      RADV_PREFIX_DELEGATION_BOTH);
 }
 
 static bool dhcp6_enable_prefix_delegation(Link *dhcp6_link) {