diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-07 14:28:09 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-07 16:22:00 +0900 |
commit | a2f684904c688fc09ddf60cc637b8734993e383a (patch) | |
tree | aeae3bd946b009f21baef040860e587138f0d741 /src/network/networkd-dhcp4.c | |
parent | 448aaf9f4373ba9980b523928d74f7793c139919 (diff) | |
download | systemd-a2f684904c688fc09ddf60cc637b8734993e383a.tar.gz systemd-a2f684904c688fc09ddf60cc637b8734993e383a.tar.bz2 systemd-a2f684904c688fc09ddf60cc637b8734993e383a.zip |
network: drop unnecessary link_enter_failed() calls
As the function called soon later anyway.
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r-- | src/network/networkd-dhcp4.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 9f820c1f40..0ca58721b9 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; } |