From 742cc8c7fa1e5f16c401918d989e95ef9bf73ed6 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 23 Nov 2017 02:29:20 +0100 Subject: [PATCH] sock: merge `if` branches for AFD_POLL_SEND and AFD_POLL_CONNECT --- src/sock.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sock.c b/src/sock.c index 319cef5..4398055 100644 --- a/src/sock.c +++ b/src/sock.c @@ -60,14 +60,12 @@ static uint32_t _afd_events_to_epoll_events(DWORD afd_events) { epoll_events |= EPOLLIN | EPOLLRDNORM; if (afd_events & AFD_POLL_RECEIVE_EXPEDITED) epoll_events |= EPOLLPRI | EPOLLRDBAND; - if (afd_events & AFD_POLL_SEND) + if (afd_events & (AFD_POLL_SEND | AFD_POLL_CONNECT)) epoll_events |= EPOLLOUT | EPOLLWRNORM | EPOLLWRBAND; if ((afd_events & AFD_POLL_DISCONNECT) && !(afd_events & AFD_POLL_ABORT)) epoll_events |= EPOLLIN | EPOLLRDHUP; if (afd_events & AFD_POLL_ABORT) epoll_events |= EPOLLHUP; - if (afd_events & AFD_POLL_CONNECT) - epoll_events |= EPOLLOUT | EPOLLWRNORM | EPOLLWRBAND; if (afd_events & AFD_POLL_CONNECT_FAIL) epoll_events |= EPOLLERR;