]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network/link: shorten code a bit
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 15 Jan 2024 06:40:07 +0000 (15:40 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 15 Jan 2024 06:46:33 +0000 (15:46 +0900)
src/network/networkd-link.c

index 5dd2fc12f6439fc78833cf9a3f862738d2c1a449..4e5ad3c035e2ec73c8e57328b4f5ab862f5e780b 100644 (file)
@@ -416,11 +416,9 @@ void link_check_ready(Link *link) {
         if (!link->activated)
                 return (void) log_link_debug(link, "%s(): link is not activated.", __func__);
 
-        if (link->iftype == ARPHRD_CAN) {
+        if (link->iftype == ARPHRD_CAN)
                 /* let's shortcut things for CAN which doesn't need most of checks below. */
-                link_set_state(link, LINK_STATE_CONFIGURED);
-                return;
-        }
+                goto ready;
 
         if (!link->stacked_netdevs_created)
                 return (void) log_link_debug(link, "%s(): stacked netdevs are not created.", __func__);