aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-02-19 19:02:43 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-02-19 19:08:58 +0300
commitb473e121317ca280e2070914033d9e26f0e7ddab (patch)
treee220e8d31bd7f0f1396061dae4b3acf56ea8df56
parentf05715b71f2ca4096f0b90e0e7bbfc3da1137e86 (diff)
downloadlibmicrohttpd-b473e121317ca280e2070914033d9e26f0e7ddab.tar.gz
libmicrohttpd-b473e121317ca280e2070914033d9e26f0e7ddab.zip
call_handlers(): use 'bool' type for parameters
-rw-r--r--src/microhttpd/daemon.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index d9c211ee..08315c45 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -887,9 +887,9 @@ MHD_get_fdset2 (struct MHD_Daemon *daemon,
887 */ 887 */
888static int 888static int
889call_handlers (struct MHD_Connection *con, 889call_handlers (struct MHD_Connection *con,
890 int read_ready, 890 bool read_ready,
891 int write_ready, 891 bool write_ready,
892 int force_close) 892 bool force_close)
893{ 893{
894 int ret; 894 int ret;
895 /* Initial state of connection. */ 895 /* Initial state of connection. */
@@ -897,7 +897,7 @@ call_handlers (struct MHD_Connection *con,
897 897
898#ifdef HTTPS_SUPPORT 898#ifdef HTTPS_SUPPORT
899 if (con->tls_read_ready) 899 if (con->tls_read_ready)
900 read_ready = MHD_YES; 900 read_ready = true;
901#endif /* HTTPS_SUPPORT */ 901#endif /* HTTPS_SUPPORT */
902 if (!force_close) 902 if (!force_close)
903 { 903 {
@@ -1662,7 +1662,7 @@ thread_main_handle_connection (void *data)
1662 &rs), 1662 &rs),
1663 FD_ISSET (con->socket_fd, 1663 FD_ISSET (con->socket_fd,
1664 &ws), 1664 &ws),
1665 MHD_NO)) 1665 false))
1666 goto exit; 1666 goto exit;
1667 } 1667 }
1668#ifdef HAVE_POLL 1668#ifdef HAVE_POLL
@@ -3061,7 +3061,7 @@ MHD_run_from_select (struct MHD_Daemon *daemon,
3061 read_fd_set), 3061 read_fd_set),
3062 FD_ISSET (ds, 3062 FD_ISSET (ds,
3063 write_fd_set), 3063 write_fd_set),
3064 MHD_NO); 3064 false);
3065 } 3065 }
3066 } 3066 }
3067 3067
@@ -3442,7 +3442,7 @@ MHD_poll_all (struct MHD_Daemon *daemon,
3442 call_handlers (pos, 3442 call_handlers (pos,
3443 0 != (p[poll_server+i].revents & POLLIN), 3443 0 != (p[poll_server+i].revents & POLLIN),
3444 0 != (p[poll_server+i].revents & POLLOUT), 3444 0 != (p[poll_server+i].revents & POLLOUT),
3445 MHD_NO); 3445 false);
3446 i++; 3446 i++;
3447 } 3447 }
3448#if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) 3448#if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT)
@@ -3936,9 +3936,9 @@ MHD_epoll (struct MHD_Daemon *daemon,
3936 /* FIXME: use (0 != pos->epoll_state & MHD_EPOLL_STATE_READ_READY) ? MHD_YES : MHD_NO 3936 /* FIXME: use (0 != pos->epoll_state & MHD_EPOLL_STATE_READ_READY) ? MHD_YES : MHD_NO
3937 * and (0 != pos->epoll_state & MHD_EPOLL_STATE_WRITE_READY) ? MHD_YES : MHD_NO */ 3937 * and (0 != pos->epoll_state & MHD_EPOLL_STATE_WRITE_READY) ? MHD_YES : MHD_NO */
3938 call_handlers (pos, 3938 call_handlers (pos,
3939 (MHD_EVENT_LOOP_INFO_READ == pos->event_loop_info) ? MHD_YES : MHD_NO, 3939 MHD_EVENT_LOOP_INFO_READ == pos->event_loop_info,
3940 (MHD_EVENT_LOOP_INFO_WRITE == pos->event_loop_info) ? MHD_YES : MHD_NO, 3940 MHD_EVENT_LOOP_INFO_WRITE == pos->event_loop_info,
3941 MHD_NO); 3941 false);
3942 if (MHD_EPOLL_STATE_IN_EREADY_EDLL == 3942 if (MHD_EPOLL_STATE_IN_EREADY_EDLL ==
3943 (pos->epoll_state & (MHD_EPOLL_STATE_SUSPENDED | MHD_EPOLL_STATE_IN_EREADY_EDLL))) 3943 (pos->epoll_state & (MHD_EPOLL_STATE_SUSPENDED | MHD_EPOLL_STATE_IN_EREADY_EDLL)))
3944 { 3944 {