]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/util.c
tree-wide: use IN_SET where possible
[thirdparty/systemd.git] / src / basic / util.c
index daaee99284ce9894ea433e63c1792864398e818c..687de40993052ddab3f64252fe66b98240a39cee 100644 (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;