]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Improve readability.
authorRoy Marples <roy@marples.name>
Sat, 21 Nov 2020 12:01:21 +0000 (12:01 +0000)
committerRoy Marples <roy@marples.name>
Sat, 21 Nov 2020 12:01:21 +0000 (12:01 +0000)
src/dhcpcd.c

index 5892a28b4eb7bc98b4059a33d45dac412f3426fb..205635e7f0ec3b5527e92f7d8edd2188a4657551 100644 (file)
@@ -991,17 +991,20 @@ void
 dhcpcd_activateinterface(struct interface *ifp, unsigned long long options)
 {
 
-       if (!ifp->active) {
-               ifp->active = IF_ACTIVE;
-               dhcpcd_initstate2(ifp, options);
-               /* It's possible we might not have been able to load
-                * a config. */
-               if (ifp->active) {
-                       configure_interface1(ifp);
-                       run_preinit(ifp);
-                       dhcpcd_prestartinterface(ifp);
-               }
-       }
+       if (ifp->active)
+               return;
+
+       ifp->active = IF_ACTIVE;
+       dhcpcd_initstate2(ifp, options);
+
+       /* It's possible we might not have been able to load
+        * a config. */
+       if (!ifp->active)
+               return;
+
+       configure_interface1(ifp);
+       run_preinit(ifp);
+       dhcpcd_prestartinterface(ifp);
 }
 
 int