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:
parent
e0ca5ead27
commit
dcebc59a98
@ -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
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user