From 0f15851e03462251ee9b67674959374f72e0afea Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sun, 26 Jan 2020 10:52:30 +0100 Subject: [PATCH] mshtml/tests: Get rid of strstrW(). Signed-off-by: Alexandre Julliard --- dlls/mshtml/tests/htmldoc.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 141d2378db7..2dcc1eecf1c 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -297,18 +297,6 @@ static BOOL wstr_contains(const WCHAR *strw, const char *stra) return strstr(buf, stra) != NULL; } -static const WCHAR *strstrW( const WCHAR *str, const WCHAR *sub ) -{ - while (*str) - { - const WCHAR *p1 = str, *p2 = sub; - while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; } - if (!*p2) return str; - str++; - } - return NULL; -} - static BSTR a2bstr(const char *str) { BSTR ret; @@ -7853,7 +7841,7 @@ static void test_cookies(IHTMLDocument2 *doc) ok(b, "InternetGetCookieW failed: %08x\n", GetLastError()); ok(!lstrcmpW(buf, str2), "cookie = %s, expected %s\n", wine_dbgstr_w(str2), wine_dbgstr_w(buf)); if(str2) - ok(strstrW(str2, str) != NULL, "could not find %s in %s\n", wine_dbgstr_w(str), wine_dbgstr_w(str2)); + ok(wcsstr(str2, str) != NULL, "could not find %s in %s\n", wine_dbgstr_w(str), wine_dbgstr_w(str2)); SysFreeString(str); SysFreeString(str2); @@ -7870,7 +7858,7 @@ static void test_cookies(IHTMLDocument2 *doc) ok(b, "InternetGetCookieW failed: %08x\n", GetLastError()); ok(!lstrcmpW(buf, str2), "cookie = %s, expected %s\n", wine_dbgstr_w(str2), wine_dbgstr_w(buf)); if(str2) - ok(strstrW(str2, str) != NULL, "could not find %s in %s\n", wine_dbgstr_w(str), wine_dbgstr_w(str2)); + ok(wcsstr(str2, str) != NULL, "could not find %s in %s\n", wine_dbgstr_w(str), wine_dbgstr_w(str2)); SysFreeString(str); SysFreeString(str2); }