From: Yu Watanabe Date: Fri, 7 Jun 2019 05:28:09 +0000 (+0900) Subject: network: drop unnecessary link_enter_failed() calls X-Git-Tag: v243-rc1~300^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a2f684904c688fc09ddf60cc637b8734993e383a;p=thirdparty%2Fsystemd.git network: drop unnecessary link_enter_failed() calls As the function called soon later anyway. --- diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 9f820c1f406..0ca58721b9e 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -472,11 +472,8 @@ static int dhcp_lease_renew(sd_dhcp_client *client, Link *link) { } r = dhcp4_update_address(link, &address, &netmask, lifetime); - if (r < 0) { - log_link_warning_errno(link, r, "Could not update IP address: %m"); - link_enter_failed(link); - return r; - } + if (r < 0) + return log_link_warning_errno(link, r, "Could not update IP address: %m"); return 0; } @@ -589,11 +586,8 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) { } r = dhcp4_update_address(link, &address, &netmask, lifetime); - if (r < 0) { - log_link_warning_errno(link, r, "Could not update IP address: %m"); - link_enter_failed(link); - return r; - } + if (r < 0) + return log_link_warning_errno(link, r, "Could not update IP address: %m"); return 0; }