diff --git a/source/include/system/dir.h b/source/include/system/dir.h index ce6aae02640..14b36c0da0a 100644 --- a/source/include/system/dir.h +++ b/source/include/system/dir.h @@ -46,16 +46,16 @@ */ #ifndef ISDOT #define ISDOT(path) ( \ - *((const char *)path) == '.' && \ - *(((const char *)path) + 1) == '\0' \ + *((const char *)(path)) == '.' && \ + *(((const char *)(path)) + 1) == '\0' \ ) #endif #ifndef ISDOTDOT #define ISDOTDOT(path) ( \ - *((const char *)path) == '.' && \ - *(((const char *)path) + 1) == '.' && \ - *(((const char *)path) + 2) == '\0' \ + *((const char *)(path)) == '.' && \ + *(((const char *)(path)) + 1) == '.' && \ + *(((const char *)(path)) + 2) == '\0' \ ) #endif diff --git a/source/ntvfs/posix/pvfs_dirlist.c b/source/ntvfs/posix/pvfs_dirlist.c index a3eaca3cbbd..517f5b68d0e 100644 --- a/source/ntvfs/posix/pvfs_dirlist.c +++ b/source/ntvfs/posix/pvfs_dirlist.c @@ -218,7 +218,7 @@ const char *pvfs_list_next(struct pvfs_dir *dir, uint_t *ofs) while ((de = readdir(dir->dir))) { const char *dname = de->d_name; - if (ISDOT(dname) || ISDOT(dname)) { + if (ISDOT(dname) || ISDOTDOT(dname)) { continue; }