diff options
author | Volker Lendecke <vl@samba.org> | 2009-11-21 16:15:16 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-11-21 20:49:16 +0100 |
commit | 97525d0a0e7e101cad5cbc218aed7fed982f30cc (patch) | |
tree | 12b009f2caf3f02417e538c4bafabaca62714579 | |
parent | e6f95967cc0a4877d62b7656882bbed920b02b2e (diff) | |
download | samba-97525d0a0e7e101cad5cbc218aed7fed982f30cc.tar.gz samba-97525d0a0e7e101cad5cbc218aed7fed982f30cc.tar.bz2 samba-97525d0a0e7e101cad5cbc218aed7fed982f30cc.zip |
s3: Avoid two calls to strcmp()
-rw-r--r-- | source3/lib/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 9d12e5b560..6348ddc193 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2386,9 +2386,9 @@ bool ms_has_wild_w(const smb_ucs2_t *s) bool mask_match(const char *string, const char *pattern, bool is_case_sensitive) { - if (strcmp(string,"..") == 0) + if (ISDOTDOT(string)) string = "."; - if (strcmp(pattern,".") == 0) + if (ISDOT(pattern)) return False; return ms_fnmatch(pattern, string, Protocol <= PROTOCOL_LANMAN2, is_case_sensitive) == 0; @@ -2402,9 +2402,9 @@ bool mask_match(const char *string, const char *pattern, bool is_case_sensitive) bool mask_match_search(const char *string, const char *pattern, bool is_case_sensitive) { - if (strcmp(string,"..") == 0) + if (ISDOTDOT(string)) string = "."; - if (strcmp(pattern,".") == 0) + if (ISDOT(pattern)) return False; return ms_fnmatch(pattern, string, True, is_case_sensitive) == 0; |