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
+1 -1
View File
@@ -202,7 +202,7 @@ int rm_rf(const char *path, RemoveFlags flags) {
fd = open(path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME);
if (fd < 0) {
if (errno != ENOTDIR && errno != ELOOP)
if (!IN_SET(errno, ENOTDIR, ELOOP))
return -errno;
if (!(flags & REMOVE_PHYSICAL)) {