tree-wide: port users over to use new ERRNO_IS_ACCEPT_AGAIN() call

This commit is contained in:
Lennart Poettering
2019-04-10 22:11:18 +02:00
parent fb0302ddbc
commit 4ff9bc2ea6
10 changed files with 72 additions and 51 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include "errno-util.h"
#include "fd-util.h"
#include "missing_network.h"
#include "resolved-dns-stub.h"
@@ -462,7 +463,7 @@ static int on_dns_stub_stream(sd_event_source *s, int fd, uint32_t revents, void
cfd = accept4(fd, NULL, NULL, SOCK_NONBLOCK|SOCK_CLOEXEC);
if (cfd < 0) {
if (IN_SET(errno, EAGAIN, EINTR))
if (ERRNO_IS_ACCEPT_AGAIN(errno))
return 0;
return -errno;
+2 -1
View File
@@ -3,6 +3,7 @@
#include <netinet/in.h>
#include <resolv.h>
#include "errno-util.h"
#include "fd-util.h"
#include "resolved-llmnr.h"
#include "resolved-manager.h"
@@ -289,7 +290,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 (IN_SET(errno, EAGAIN, EINTR))
if (ERRNO_IS_ACCEPT_AGAIN(errno))
return 0;
return -errno;