This is a trial to make it more obvious what the historically
grown code is actually doing.

Signed-off-by: Michael Heimpold <m...@heimpold.de>
---
v2: use Jo-Philipp Wich's proposal

 inittab.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/inittab.c b/inittab.c
index 55554b9..c9e6c13 100644
--- a/inittab.c
+++ b/inittab.c
@@ -259,12 +259,9 @@ void procd_inittab_run(const char *handler)
 
        list_for_each_entry(a, &actions, list)
                if (!strcmp(a->handler->name, handler)) {
-                       if (a->handler->multi) {
-                               a->handler->cb(a);
-                               continue;
-                       }
                        a->handler->cb(a);
-                       break;
+                       if (!a->handler->multi)
+                               break;
                }
 }
 
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to