summaryrefslogtreecommitdiff
path: root/source3/smbd/msdfs.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-06-16 18:07:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:25 -0500
commit43e51b39892e1742a22c3fb61c4e8afc6a09edc0 (patch)
treeeff0702adfe05dd0efb878a6651b235b8b3821a2 /source3/smbd/msdfs.c
parent32ba5145b8c8385f56a1e8f025c7be1bc848077b (diff)
downloadsamba-43e51b39892e1742a22c3fb61c4e8afc6a09edc0.tar.gz
samba-43e51b39892e1742a22c3fb61c4e8afc6a09edc0.tar.bz2
samba-43e51b39892e1742a22c3fb61c4e8afc6a09edc0.zip
r23522: Save us a kilobyte stack space in a hot code path: I can't see a reason
why check_path_syntax should not be able to run in-line. The destination pointer either walks side by side with the source pointer or is decremented. So as far as I can see s>=d is true throughout the whole routine. Jeremy, I'm checking this only into 3_0 for now. Please review and ack or directly merge this to 3_0_26. Thanks, Volker (This used to be commit 34a13c82a3b72d6900614b57c58fbaefeeca8fa7)
Diffstat (limited to 'source3/smbd/msdfs.c')
-rw-r--r--source3/smbd/msdfs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 9f203bfd19..a3de199116 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -144,14 +144,16 @@ static NTSTATUS parse_dfs_path(const char *pathname,
*ppath_contains_wcard = False;
+ pstrcpy(pdp->reqpath, p);
+
/* Rest is reqpath. */
if (pdp->posix_path) {
- status = check_path_syntax_posix(pdp->reqpath, p);
+ status = check_path_syntax_posix(pdp->reqpath);
} else {
if (allow_wcards) {
- status = check_path_syntax_wcard(pdp->reqpath, p, ppath_contains_wcard);
+ status = check_path_syntax_wcard(pdp->reqpath, ppath_contains_wcard);
} else {
- status = check_path_syntax(pdp->reqpath, p);
+ status = check_path_syntax(pdp->reqpath);
}
}