summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_resolve.c
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2006-04-24 00:16:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:14 -0500
commit6ab33938d5239e8688440f65e802f627622d301b (patch)
tree7c2253d8e3252ccd973b2d2d36754d0d0e196d7a /source4/ntvfs/posix/pvfs_resolve.c
parentf380d365eaad89db2c46331a3fa2d5d8600aeba1 (diff)
downloadsamba-6ab33938d5239e8688440f65e802f627622d301b.tar.gz
samba-6ab33938d5239e8688440f65e802f627622d301b.tar.bz2
samba-6ab33938d5239e8688440f65e802f627622d301b.zip
r15186: Introduce ISDOT and ISDOTDOT macros for testing whether a filename is
"." for "..". These express the intention better that strcmp or strequal and improve searchability via cscope/ctags. (This used to be commit 7e4ad7e8e5ec266b969e3075c4ad7f021571f24e)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_resolve.c')
-rw-r--r--source4/ntvfs/posix/pvfs_resolve.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c
index b8e55c85bf..70a1c0523a 100644
--- a/source4/ntvfs/posix/pvfs_resolve.c
+++ b/source4/ntvfs/posix/pvfs_resolve.c
@@ -372,7 +372,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx, const char **fname, uint_t
if (strcmp(components[i], "") == 0) {
continue;
}
- if (strcmp(components[i], ".") == 0 || err_count) {
+ if (ISDOT(components[i]) || err_count) {
err_count++;
}
}
@@ -394,7 +394,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx, const char **fname, uint_t
i--;
continue;
}
- if (strcmp(components[i], "..") == 0) {
+ if (ISDOTDOT(components[i])) {
if (i < 1) return NT_STATUS_OBJECT_PATH_SYNTAX_BAD;
memmove(&components[i-1], &components[i+1],
sizeof(char *)*(num_components-(i+1)));