From ac83aeba0153063cae53cf20a99dfd571c5b44fc Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 22 Jul 2016 16:10:30 +0000 Subject: for loop -> while loop. Cleaner. --- src/s6-rc/s6-rc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/s6-rc/s6-rc.c b/src/s6-rc/s6-rc.c index 5758175..3ae779a 100644 --- a/src/s6-rc/s6-rc.c +++ b/src/s6-rc/s6-rc.c @@ -325,11 +325,9 @@ static int doit (int spfd, int h) i = n ; while (i--) examine(i, h) ; - for (;;) + while (npids) { - register int r ; - if (!npids) break ; - r = iopause_g(&x, 1, &deadline) ; + register int r = iopause_g(&x, 1, &deadline) ; if (r < 0) strerr_diefu1sys(111, "iopause") ; if (!r) strerr_dief1x(2, "timed out") ; if (!handle_signals(h)) exitcode = 1 ; -- cgit v1.2.3