# HG changeset patch # User Roy Marples # Date 1605960081 0 # Node ID c9182c3618e66c481b4922b8b0595fe2c96d3a1d # Parent 08426e8a98a7747813b5b31b453188731b7d9c7c Improve readability. diff -r 08426e8a98a7 -r c9182c3618e6 src/dhcpcd.c --- a/src/dhcpcd.c Sat Nov 21 11:59:07 2020 +0000 +++ b/src/dhcpcd.c Sat Nov 21 12:01:21 2020 +0000 @@ -991,17 +991,20 @@ 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