tree-wide: use !IN_SET(..) for a != b && a != c && …

The included cocci was used to generate the changes.

Thanks to @flo-wer for pointing this case out.
This commit is contained in:
Andreas Rammhold
2017-10-02 13:09:56 +02:00
parent 3742095b27
commit ec2ce0c5d7
24 changed files with 185 additions and 60 deletions
+2 -2
View File
@@ -167,7 +167,7 @@ static int connection_shovel(
} else if (z == 0 || errno == EPIPE || errno == ECONNRESET) {
*from_source = sd_event_source_unref(*from_source);
*from = safe_close(*from);
} else if (errno != EAGAIN && errno != EINTR)
} else if (!IN_SET(errno, EAGAIN, EINTR))
return log_error_errno(errno, "Failed to splice: %m");
}
@@ -179,7 +179,7 @@ static int connection_shovel(
} else if (z == 0 || errno == EPIPE || errno == ECONNRESET) {
*to_source = sd_event_source_unref(*to_source);
*to = safe_close(*to);
} else if (errno != EAGAIN && errno != EINTR)
} else if (!IN_SET(errno, EAGAIN, EINTR))
return log_error_errno(errno, "Failed to splice: %m");
}
} while (shoveled);