From: Roy Marples Date: Sat, 21 Nov 2020 12:01:21 +0000 (+0000) Subject: Improve readability. X-Git-Tag: v9.3.4~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7751af5f3879781aef0e3f722eaef4811fdb81aa;p=thirdparty%2Fdhcpcd.git Improve readability. --- 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