chiark / gitweb /
clean-ipc: don't filter out '.' and '..' twice
[elogind.git] / src / shared / clean-ipc.c
index c92ba677e67be0a41480741d8b8b0167747bf7e1..55ae1f9ba524a4849314839793cc747290ec67ca 100644 (file)
@@ -207,7 +207,7 @@ static int clean_posix_shm_internal(DIR *dir, uid_t uid) {
 
         assert(dir);
 
-        FOREACH_DIRENT(de, dir, goto fail) {
+        FOREACH_DIRENT_ALL(de, dir, goto fail) {
                 struct stat st;
 
                 if (STR_IN_SET(de->d_name, "..", "."))
@@ -296,7 +296,7 @@ static int clean_posix_mq(uid_t uid) {
                 return log_warning_errno(errno, "Failed to open /dev/mqueue: %m");
         }
 
-        FOREACH_DIRENT(de, dir, goto fail) {
+        FOREACH_DIRENT_ALL(de, dir, goto fail) {
                 struct stat st;
                 char fn[1+strlen(de->d_name)+1];
 
@@ -359,7 +359,6 @@ int clean_ipc(uid_t uid) {
         if (r < 0)
                 ret = r;
 
-
 #if 0 /// elogind does not use mq_open anywhere
         r = clean_posix_mq(uid);
         if (r < 0)