libmicrohttpd

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

commit 3b2c0e14365870933c6090d3c2537995e48b36e5
parent f9c239ec2a5d21a5ea4855fb002b65aeb10eb012
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 15 Feb 2017 13:28:32 +0100

convert upgrade_fd_in_epoll to 'bool'

Diffstat:
Msrc/microhttpd/daemon.c | 8++++----
Msrc/microhttpd/internal.h | 6+++---
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -3758,7 +3758,7 @@ MHD_epoll (struct MHD_Daemon *daemon, } #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) - if ( (MHD_NO == daemon->upgrade_fd_in_epoll) && + if ( (! daemon->upgrade_fd_in_epoll) && (-1 != daemon->epoll_upgrade_fd) ) { event.events = EPOLLIN | EPOLLOUT; @@ -3775,7 +3775,7 @@ MHD_epoll (struct MHD_Daemon *daemon, #endif return MHD_NO; } - daemon->upgrade_fd_in_epoll = MHD_YES; + daemon->upgrade_fd_in_epoll = true; } #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ if ( (daemon->listen_socket_in_epoll) && @@ -5544,14 +5544,14 @@ thread_failed: indicate failure */ #ifdef EPOLL_SUPPORT #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) - if (MHD_YES == daemon->upgrade_fd_in_epoll) + if (daemon->upgrade_fd_in_epoll) { if (0 != epoll_ctl (daemon->epoll_fd, EPOLL_CTL_DEL, daemon->epoll_upgrade_fd, NULL)) MHD_PANIC (_("Failed to remove FD from epoll set\n")); - daemon->upgrade_fd_in_epoll = MHD_NO; + daemon->upgrade_fd_in_epoll = false; } #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ if (-1 != daemon->epoll_fd) diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h @@ -1407,10 +1407,10 @@ struct MHD_Daemon int epoll_upgrade_fd; /** - * #MHD_YES if @e epoll_upgrade_fd is in the 'epoll' set, - * #MHD_NO if not. + * true if @e epoll_upgrade_fd is in the 'epoll' set, + * false if not. */ - int upgrade_fd_in_epoll; + bool upgrade_fd_in_epoll; #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ #endif