diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2016-07-22 16:10:30 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2016-07-22 16:10:30 +0000 |
commit | ac83aeba0153063cae53cf20a99dfd571c5b44fc (patch) | |
tree | b2e8c6f82c4fcc3d0058aee92cea64f90f21e681 /src | |
parent | b818d5299a5f3dcc8fdca35bb38afe8e94ba4043 (diff) | |
download | s6-rc-ac83aeba0153063cae53cf20a99dfd571c5b44fc.tar.xz |
for loop -> while loop. Cleaner.
Diffstat (limited to 'src')
-rw-r--r-- | src/s6-rc/s6-rc.c | 6 |
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 ; |