1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

r15189: Add parentheses to force ISDOt and ISDOTDOT evaluation order. Fix typo

that made the BASE-DIR2 test fail.
This commit is contained in:
James Peach 2006-04-24 02:36:55 +00:00 committed by Gerald (Jerry) Carter
parent e0ca5ead27
commit dcebc59a98
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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;
}