tree-wide: use IN_SET where possible

In addition to the changes from #6933 this handles cases that could be
matched with the included cocci file.
This commit is contained in:
Andreas Rammhold
2017-10-02 13:09:54 +02:00
parent 01a65d4180
commit 3742095b27
58 changed files with 140 additions and 131 deletions
+1 -1
View File
@@ -378,7 +378,7 @@ int on_ac_power(void) {
device = openat(dirfd(d), de->d_name, O_DIRECTORY|O_RDONLY|O_CLOEXEC|O_NOCTTY);
if (device < 0) {
if (errno == ENOENT || errno == ENOTDIR)
if (IN_SET(errno, ENOENT, ENOTDIR))
continue;
return -errno;