X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fclean-ipc.c;h=3b4231827725cda1c912e59dcc20a314d17b333f;hb=cb4c5148b5dab1eaf42347bde0368b6df916a206;hp=8c60bdc1f2be77ae301b7d95a96ccde5ac87690d;hpb=a683e1878913969ccf8b0defdec4d955e15ed75a;p=elogind.git diff --git a/src/shared/clean-ipc.c b/src/shared/clean-ipc.c index 8c60bdc1f..3b4231827 100644 --- a/src/shared/clean-ipc.c +++ b/src/shared/clean-ipc.c @@ -36,7 +36,7 @@ #include "dirent-util.h" #include "fd-util.h" #include "fileio.h" -#include "formats-util.h" +#include "format-util.h" #include "log.h" #include "macro.h" #include "string-util.h" @@ -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) {