From 8271a2ed57331f211c781bb551efe52e380902ae Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 11 Aug 2023 15:12:25 +1000 Subject: epoll: Tiny cleanup to udp_sock_handler() Move the test for c->no_udp into the function itself, rather than in the dispatching switch statement to better localize the UDP specific logic, and make for greated consistency with other handler functions. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'udp.c') diff --git a/udp.c b/udp.c index 62f8360..138e7ab 100644 --- a/udp.c +++ b/udp.c @@ -756,7 +756,7 @@ void udp_sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events, struct mmsghdr *mmh_recv; int i, m; - if (!(events & EPOLLIN)) + if (c->no_udp || !(events & EPOLLIN)) return; if (v6) { -- cgit v1.2.3