summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-07-22 16:10:30 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-07-22 16:10:30 +0000
commitac83aeba0153063cae53cf20a99dfd571c5b44fc (patch)
treeb2e8c6f82c4fcc3d0058aee92cea64f90f21e681
parentb818d5299a5f3dcc8fdca35bb38afe8e94ba4043 (diff)
downloads6-rc-ac83aeba0153063cae53cf20a99dfd571c5b44fc.tar.xz
for loop -> while loop. Cleaner.
-rw-r--r--src/s6-rc/s6-rc.c6
1 files 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 ;