chiark / gitweb /
Allow braceless variables to be expanded
[elogind.git] / src / shared / clean-ipc.c
index ba48fb0ec5871cd1607fbb1282667e01765c741d..3b4231827725cda1c912e59dcc20a314d17b333f 100644 (file)
@@ -225,7 +225,7 @@ static int clean_posix_shm_internal(DIR *dir, uid_t uid, gid_t gid) {
         FOREACH_DIRENT_ALL(de, dir, goto fail) {
                 struct stat st;
 
-                if (STR_IN_SET(de->d_name, "..", "."))
+                if (dot_or_dot_dot(de->d_name))
                         continue;
 
                 if (fstatat(dirfd(dir), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) {
@@ -311,7 +311,7 @@ static int clean_posix_mq(uid_t uid, gid_t gid) {
                 struct stat st;
                 char fn[1+strlen(de->d_name)+1];
 
-                if (STR_IN_SET(de->d_name, "..", "."))
+                if (dot_or_dot_dot(de->d_name))
                         continue;
 
                 if (fstatat(dirfd(dir), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) {