tree-wide: use IN_SET macro (#6977)

This commit is contained in:
Yu Watanabe
2017-10-04 16:01:32 +02:00
committed by Zbigniew Jędrzejewski-Szmek
parent 6d0aa4db7b
commit 4c70109600
92 changed files with 168 additions and 191 deletions
+2 -2
View File
@@ -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))