From: Yu Watanabe Date: Mon, 15 Jan 2024 06:40:07 +0000 (+0900) Subject: network/link: shorten code a bit X-Git-Tag: v256-rc1~1157^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24b9c341ce60f6a8512b2e9162d1b50187f2a053;p=thirdparty%2Fsystemd.git network/link: shorten code a bit --- diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 5dd2fc12f64..4e5ad3c035e 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -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__);