diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-05-14 00:35:02 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-05-14 00:35:02 +0000 |
commit | e5dd06303f15ec5610bbe6812c896628c9e55c07 (patch) | |
tree | 2ed7e9f4ebd363278882eaf0bc1f87ddde0503da /src/conn-tools/s6-tcpserver6d.c | |
parent | 10f60c0d4dd8882e5a7553efe33522c958f73e57 (diff) | |
download | s6-networking-e5dd06303f15ec5610bbe6812c896628c9e55c07.tar.xz |
Different code style for the maxconn spurious warning avoidance
Diffstat (limited to 'src/conn-tools/s6-tcpserver6d.c')
-rw-r--r-- | src/conn-tools/s6-tcpserver6d.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/conn-tools/s6-tcpserver6d.c b/src/conn-tools/s6-tcpserver6d.c index 8000531..65e9133 100644 --- a/src/conn-tools/s6-tcpserver6d.c +++ b/src/conn-tools/s6-tcpserver6d.c @@ -360,13 +360,12 @@ int main (int argc, char const *const *argv, char const *const *envp) while (cont) { - int h = numconn < maxconn ; - if (iopause_g(x, 1 + h, 0) < 0) + if (iopause_g(x, 1 + (numconn < maxconn), 0) < 0) strerr_diefu1sys(111, "iopause") ; if (x[0].revents & IOPAUSE_EXCEPT) strerr_dief1x(111, "trouble with selfpipe") ; - if (x[0].revents & IOPAUSE_READ) handle_signals() ; - if (h) + if (x[0].revents & IOPAUSE_READ) { handle_signals() ; continue ; } + if (numconn < maxconn) { if (x[1].revents & IOPAUSE_EXCEPT) strerr_dief1x(111, "trouble with socket") ; if (x[1].revents & IOPAUSE_READ) |