diff options
author | Andreas Rammhold <andreas@rammhold.de> | 2017-09-29 00:37:23 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-09-29 00:37:23 +0200 |
commit | a4488a7509a96d8b9f0d7793517a217c70ac0361 (patch) | |
tree | b7e4afb30d283f580ba35d37290bcf22a124a091 /src/basic/util.c | |
parent | 471b87cc6c159bafd11023e009fc43aa73812b5f (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.c | 2 |
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; |