From 3742095b27f8df4b195d530b52d15bc5fea70bf1 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Fri, 29 Sep 2017 00:37:23 +0200 Subject: tree-wide: use IN_SET where possible In addition to the changes from #6933 this handles cases that could be matched with the included cocci file. --- src/resolve/resolved-llmnr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/resolve/resolved-llmnr.c') diff --git a/src/resolve/resolved-llmnr.c b/src/resolve/resolved-llmnr.c index 29396e9973..0cf4583572 100644 --- a/src/resolve/resolved-llmnr.c +++ b/src/resolve/resolved-llmnr.c @@ -345,7 +345,7 @@ static int on_llmnr_stream(sd_event_source *s, int fd, uint32_t revents, void *u cfd = accept4(fd, NULL, NULL, SOCK_NONBLOCK|SOCK_CLOEXEC); if (cfd < 0) { - if (errno == EAGAIN || errno == EINTR) + if (IN_SET(errno, EAGAIN, EINTR)) return 0; return -errno; -- cgit v1.2.3