Alexandre Julliard : urlmon: Use strncmpiW instead of memicmpW for strings without embedded nulls.

Alexandre Julliard julliard at winehq.org
Wed May 8 18:22:48 CDT 2019


Module: wine
Branch: master
Commit: 1dd25f2deaafd7834ce981603316734ab2843ecb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1dd25f2deaafd7834ce981603316734ab2843ecb

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed May  8 08:35:05 2019 -0500

urlmon: Use strncmpiW instead of memicmpW for strings without embedded nulls.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/urlmon/uri.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c
index 92978dc..07026ea 100644
--- a/dlls/urlmon/uri.c
+++ b/dlls/urlmon/uri.c
@@ -3889,7 +3889,7 @@ static HRESULT compare_file_paths(const Uri *a, const Uri *b, BOOL *ret)
     }
 
     /* Fast path */
-    if(a->path_len == b->path_len && !memicmpW(a->canon_uri+a->path_start, b->canon_uri+b->path_start, a->path_len)) {
+    if(a->path_len == b->path_len && !strncmpiW(a->canon_uri+a->path_start, b->canon_uri+b->path_start, a->path_len)) {
         *ret = TRUE;
         return S_OK;
     }
@@ -3909,7 +3909,7 @@ static HRESULT compare_file_paths(const Uri *a, const Uri *b, BOOL *ret)
     len_a = canonicalize_path_hierarchical(a->canon_uri+a->path_start, a->path_len, a->scheme_type, FALSE, 0, FALSE, canon_path_a);
     len_b = canonicalize_path_hierarchical(b->canon_uri+b->path_start, b->path_len, b->scheme_type, FALSE, 0, FALSE, canon_path_b);
 
-    *ret = len_a == len_b && !memicmpW(canon_path_a, canon_path_b, len_a);
+    *ret = len_a == len_b && !strncmpiW(canon_path_a, canon_path_b, len_a);
 
     heap_free(canon_path_a);
     heap_free(canon_path_b);




More information about the wine-cvs mailing list