]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: drop unnecessary link_enter_failed() calls
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 7 Jun 2019 05:28:09 +0000 (14:28 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 7 Jun 2019 07:22:00 +0000 (16:22 +0900)
As the function called soon later anyway.

src/network/networkd-dhcp4.c

index 9f820c1f4062ac253abf2e2159450c3f74fd1395..0ca58721b9ef33877ac57c072f43f08ee9fd80e3 100644 (file)
@@ -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;
 }