procd: simplify code in procd_inittab_run
authorMichael Heimpold <mhei@heimpold.de>
Tue, 1 Jan 2019 23:44:53 +0000 (00:44 +0100)
committerJohn Crispin <john@phrozen.org>
Sun, 27 Oct 2019 13:23:33 +0000 (14:23 +0100)
This is a trial to make it more obvious what the historically
grown code is actually doing.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
inittab.c

index 1cfef2ba78c69f5e26fe4cce66585f9520e314e4..45118f4f1eaf05867e98040562131dc7df8e233e 100644 (file)
--- a/inittab.c
+++ b/inittab.c
@@ -276,12 +276,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;
                }
 }