diff --git a/net/tcp/tcp_netpoll.c b/net/tcp/tcp_netpoll.c index 5a044d70166..f2c6f3b1bad 100644 --- a/net/tcp/tcp_netpoll.c +++ b/net/tcp/tcp_netpoll.c @@ -212,8 +212,8 @@ static inline void tcp_iob_work(FAR void *arg) * event. If so, don't do it again and don't setup notification again. */ - else if ((fds->events && POLLWRNORM) == 0 || - (fds->revents && POLLWRNORM) != 0) + else if ((fds->events & POLLWRNORM) != 0 && + (fds->revents & POLLWRNORM) == 0) { /* Check if we are now able to send */ diff --git a/net/udp/udp_netpoll.c b/net/udp/udp_netpoll.c index 4ac2a563f8c..9c2ae9a134f 100644 --- a/net/udp/udp_netpoll.c +++ b/net/udp/udp_netpoll.c @@ -185,8 +185,8 @@ static inline void udp_iob_work(FAR void *arg) * event. If so, don't do it again. */ - if ((fds->events && POLLWRNORM) == 0 || - (fds->revents && POLLWRNORM) != 0) + if ((fds->events & POLLWRNORM) != 0 && + (fds->revents & POLLWRNORM) == 0) { /* Check if we are now able to send */