summaryrefslogtreecommitdiff
path: root/src/basic/util.c
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2017-09-29 00:37:23 +0200
committerSven Eden <yamakuzure@gmx.net>2017-09-29 00:37:23 +0200
commita4488a7509a96d8b9f0d7793517a217c70ac0361 (patch)
treeb7e4afb30d283f580ba35d37290bcf22a124a091 /src/basic/util.c
parent471b87cc6c159bafd11023e009fc43aa73812b5f (diff)
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.
Diffstat (limited to 'src/basic/util.c')
-rw-r--r--src/basic/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/util.c b/src/basic/util.c
index 463f6fd12..3dfe1ff65 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -383,7 +383,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;