Michael Stefaniuc : winhttp/tests: Get rid of strcmp_wa().

Alexandre Julliard julliard at winehq.org
Thu Feb 6 15:44:18 CST 2020


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

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Thu Feb  6 22:41:17 2020 +0200

winhttp/tests: Get rid of strcmp_wa().

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

---

 dlls/winhttp/tests/winhttp.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index b73c57a41d..83f7809a3c 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -43,22 +43,6 @@ static const WCHAR test_winehq[] = {'t','e','s','t','.','w','i','n','e','h','q',
 static const WCHAR test_winehq_https[] = {'h','t','t','p','s',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g',':','4','4','3',0};
 static const WCHAR localhostW[] = {'l','o','c','a','l','h','o','s','t',0};
 
-static WCHAR *a2w(const char *str)
-{
-    int len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
-    WCHAR *ret = heap_alloc(len * sizeof(WCHAR));
-    MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
-    return ret;
-}
-
-static int strcmp_wa(const WCHAR *str1, const char *stra)
-{
-    WCHAR *str2 = a2w(stra);
-    int r = lstrcmpW(str1, str2);
-    heap_free(str2);
-    return r;
-}
-
 static BOOL proxy_active(void)
 {
     WINHTTP_PROXY_INFO proxy_info;
@@ -2869,7 +2853,7 @@ static void test_multi_authentication(int port)
     size = sizeof(buf);
     ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_CUSTOM, www_authenticateW, buf, &size, &index);
     ok(ret, "expected success\n");
-    ok(!strcmp_wa(buf, "Bearer"), "buf = %s\n", wine_dbgstr_w(buf));
+    ok(!lstrcmpW(buf, L"Bearer"), "buf = %s\n", wine_dbgstr_w(buf));
     ok(size == lstrlenW(buf) * sizeof(WCHAR), "size = %u\n", size);
     ok(index == 1, "index = %u\n", index);
 




More information about the wine-cvs mailing list