summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-09-03 17:44:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:32 -0500
commitcecc2b38f1d3ed2c29487bd4fcfd38487095661d (patch)
treee4d13c644e31728f505cec25da9f06bc557d6034
parent13f44bbacb120703910cf48233444c357ccfd228 (diff)
downloadsamba-cecc2b38f1d3ed2c29487bd4fcfd38487095661d.tar.gz
samba-cecc2b38f1d3ed2c29487bd4fcfd38487095661d.tar.bz2
samba-cecc2b38f1d3ed2c29487bd4fcfd38487095661d.zip
r2212: Optimisation. Passes masktest against W2K3.
Jeremy. (This used to be commit fb7a529c4c65788c307c1043cf2b664059ed8c2a)
-rw-r--r--source4/lib/ms_fnmatch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/ms_fnmatch.c b/source4/lib/ms_fnmatch.c
index dd015a0ac8..1c4b3d1806 100644
--- a/source4/lib/ms_fnmatch.c
+++ b/source4/lib/ms_fnmatch.c
@@ -173,6 +173,9 @@ static int ms_fnmatch_w(const smb_ucs2_t *pattern, const smb_ucs2_t *string,
break;
case UCS2_CHAR('*'):
+ while (*p == UCS2_CHAR('*')) {
+ p++;
+ }
for (; *n; n++) {
if (ms_fnmatch_w(p, n, protocol) == 0) return 0;
}