Commit a521bfd3 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

kernelbase: Do not return S_FALSE from UrlGetPartW().

Only return it from UrlGetPartA(). Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 17a8fd84
...@@ -4166,6 +4166,7 @@ HRESULT WINAPI UrlGetPartA(const char *url, char *out, DWORD *out_len, DWORD par ...@@ -4166,6 +4166,7 @@ HRESULT WINAPI UrlGetPartA(const char *url, char *out, DWORD *out_len, DWORD par
len2 = WideCharToMultiByte(CP_ACP, 0, outW, len + 1, out, *out_len, NULL, NULL); len2 = WideCharToMultiByte(CP_ACP, 0, outW, len + 1, out, *out_len, NULL, NULL);
*out_len = len2 - 1; *out_len = len2 - 1;
heap_free(inW); heap_free(inW);
if (hr == S_OK && !*out_len) hr = S_FALSE;
return hr; return hr;
} }
...@@ -4382,7 +4383,7 @@ HRESULT WINAPI UrlGetPartW(const WCHAR *url, WCHAR *out, DWORD *out_len, DWORD p ...@@ -4382,7 +4383,7 @@ HRESULT WINAPI UrlGetPartW(const WCHAR *url, WCHAR *out, DWORD *out_len, DWORD p
} }
TRACE("len=%ld %s\n", *out_len, wine_dbgstr_w(out)); TRACE("len=%ld %s\n", *out_len, wine_dbgstr_w(out));
return *out_len ? S_OK : S_FALSE; return S_OK;
} }
BOOL WINAPI UrlIsA(const char *url, URLIS Urlis) BOOL WINAPI UrlIsA(const char *url, URLIS Urlis)
......
...@@ -748,8 +748,6 @@ static void test_UrlGetPart(void) ...@@ -748,8 +748,6 @@ static void test_UrlGetPart(void)
{"telnet://hostname/", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "telnet:hostname"}, {"telnet://hostname/", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "telnet:hostname"},
}; };
winetest_mute_threshold = 5;
hr = UrlGetPartA(NULL, NULL, NULL, URL_PART_SCHEME, 0); hr = UrlGetPartA(NULL, NULL, NULL, URL_PART_SCHEME, 0);
ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
...@@ -837,7 +835,7 @@ static void test_UrlGetPart(void) ...@@ -837,7 +835,7 @@ static void test_UrlGetPart(void)
size = 1; size = 1;
wcscpy(bufferW, L"x"); wcscpy(bufferW, L"x");
hr = UrlGetPartW(urlW, bufferW, &size, part, flags); hr = UrlGetPartW(urlW, bufferW, &size, part, flags);
todo_wine_if (tests[i].todo_hr || tests[i].hr == S_FALSE) todo_wine_if (tests[i].todo_hr)
{ {
if (tests[i].hr == S_OK) if (tests[i].hr == S_OK)
ok(hr == E_POINTER, "Got hr %#lx.\n", hr); ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
...@@ -870,7 +868,7 @@ static void test_UrlGetPart(void) ...@@ -870,7 +868,7 @@ static void test_UrlGetPart(void)
size = ARRAY_SIZE(bufferW); size = ARRAY_SIZE(bufferW);
wcscpy(bufferW, L"x"); wcscpy(bufferW, L"x");
hr = UrlGetPartW(urlW, bufferW, &size, part, flags); hr = UrlGetPartW(urlW, bufferW, &size, part, flags);
todo_wine_if ((tests[i].hr == S_FALSE || tests[i].todo_hr) && strcmp(url, "a:") && strcmp(url, "0:")) todo_wine_if (tests[i].todo_hr && strcmp(url, "a:") && strcmp(url, "0:"))
ok(hr == (tests[i].hr == S_FALSE ? S_OK : tests[i].hr), "Got hr %#lx.\n", hr); ok(hr == (tests[i].hr == S_FALSE ? S_OK : tests[i].hr), "Got hr %#lx.\n", hr);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
...@@ -886,8 +884,6 @@ static void test_UrlGetPart(void) ...@@ -886,8 +884,6 @@ static void test_UrlGetPart(void)
winetest_pop_context(); winetest_pop_context();
} }
winetest_mute_threshold = 42;
} }
/* ########################### */ /* ########################### */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment