libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 88d27af738c0c73cc885ec75d52a142c5087367e
parent 9f22ba9b0bc726791d182871cebae4990e341194
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Thu,  6 Oct 2022 13:38:08 +0300

MHD_run_wait(): improved readability

Diffstat:
Msrc/microhttpd/daemon.c | 12+++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -5528,25 +5528,23 @@ MHD_run_wait (struct MHD_Daemon *daemon, if (0 > millisec) millisec = -1; - if (false) - { - (void) 0; /* Mute compiler warning */ - } #ifdef HAVE_POLL - else if (0 != (daemon->options & MHD_USE_POLL)) + if (0 != (daemon->options & MHD_USE_POLL)) { res = MHD_poll_all (daemon, millisec); MHD_cleanup_connections (daemon); } + else #endif /* HAVE_POLL */ #ifdef EPOLL_SUPPORT - else if (0 != (daemon->options & MHD_USE_EPOLL)) + if (0 != (daemon->options & MHD_USE_EPOLL)) { res = MHD_epoll (daemon, millisec); MHD_cleanup_connections (daemon); } -#endif else +#endif + if (1) { res = MHD_select (daemon, millisec); /* MHD_select does MHD_cleanup_connections already */