summaryrefslogtreecommitdiffstats
path: root/src/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-11-21 12:01:21 +0000
committerRoy Marples <roy@marples.name>2020-11-21 12:01:21 +0000
commit7751af5f3879781aef0e3f722eaef4811fdb81aa (patch)
tree35bc758cc716fb55e29dca15c7a2951935bf2880 /src/dhcpcd.c
parent9b683ed33dbd9c6b6f3af71496a28edd584fc45a (diff)
downloaddhcpcd-7751af5f3879781aef0e3f722eaef4811fdb81aa.tar.xz
Improve readability.
Diffstat (limited to 'src/dhcpcd.c')
-rw-r--r--src/dhcpcd.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c
index 5892a28b..205635e7 100644
--- a/src/dhcpcd.c
+++ b/src/dhcpcd.c
@@ -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