summaryrefslogtreecommitdiffstats
path: root/src/socket-proxy/socket-proxyd.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2017-10-04 16:01:32 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-10-04 16:01:32 +0200
commit4c701096002fff540d9ddb3b21398c551ac3af78 (patch)
tree537e654dc92baa5eed5b6ff69867114384ecfa47 /src/socket-proxy/socket-proxyd.c
parentMerge pull request #6986 from OpenDZ/tixxdz/seccomp-more-default-syscalls-v1 (diff)
downloadsystemd-4c701096002fff540d9ddb3b21398c551ac3af78.tar.xz
systemd-4c701096002fff540d9ddb3b21398c551ac3af78.zip
tree-wide: use IN_SET macro (#6977)
Diffstat (limited to 'src/socket-proxy/socket-proxyd.c')
-rw-r--r--src/socket-proxy/socket-proxyd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
index bf8c2f86a3..34c938438c 100644
--- a/src/socket-proxy/socket-proxyd.c
+++ b/src/socket-proxy/socket-proxyd.c
@@ -164,7 +164,7 @@ static int connection_shovel(
if (z > 0) {
*full += z;
shoveled = true;
- } else if (z == 0 || errno == EPIPE || errno == ECONNRESET) {
+ } else if (z == 0 || IN_SET(errno, EPIPE, ECONNRESET)) {
*from_source = sd_event_source_unref(*from_source);
*from = safe_close(*from);
} else if (!IN_SET(errno, EAGAIN, EINTR))
@@ -176,7 +176,7 @@ static int connection_shovel(
if (z > 0) {
*full -= z;
shoveled = true;
- } else if (z == 0 || errno == EPIPE || errno == ECONNRESET) {
+ } else if (z == 0 || IN_SET(errno, EPIPE, ECONNRESET)) {
*to_source = sd_event_source_unref(*to_source);
*to = safe_close(*to);
} else if (!IN_SET(errno, EAGAIN, EINTR))