diff options
| author | Roy Marples <roy@marples.name> | 2020-11-21 12:01:21 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-11-21 12:01:21 +0000 |
| commit | 7751af5f3879781aef0e3f722eaef4811fdb81aa (patch) | |
| tree | 35bc758cc716fb55e29dca15c7a2951935bf2880 /src/dhcpcd.c | |
| parent | 9b683ed33dbd9c6b6f3af71496a28edd584fc45a (diff) | |
| download | dhcpcd-7751af5f3879781aef0e3f722eaef4811fdb81aa.tar.xz | |
Improve readability.
Diffstat (limited to 'src/dhcpcd.c')
| -rw-r--r-- | src/dhcpcd.c | 25 |
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 |
