Zebediah Figura : mpr/tests: Fix drive search loop.
Module: wine Branch: master Commit: 84b0ed91610d43cedfe4803d6e93511a3afe6528 URL: https://source.winehq.org/git/wine.git/?a=commit;h=84b0ed91610d43cedfe4803d6... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Jan 2 00:33:48 2018 -0600 mpr/tests: Fix drive search loop. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mpr/tests/mpr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/mpr/tests/mpr.c b/dlls/mpr/tests/mpr.c index a6af1b5..330e66b 100644 --- a/dlls/mpr/tests/mpr.c +++ b/dlls/mpr/tests/mpr.c @@ -284,8 +284,9 @@ static void test_WNetUseConnection(void) strcpy(netRes->lpRemoteName, "\\\\127.0.0.1\\c$"); bufSize = 0; ret = pWNetUseConnectionA(NULL, netRes, NULL, NULL, 0, NULL, &bufSize, &outRes); - if (ret == ERROR_ALREADY_ASSIGNED) continue; + if (ret != ERROR_ALREADY_ASSIGNED) break; } + if (ret == ERROR_ALREADY_ASSIGNED) goto end; /* no drives available */ todo_wine ok(ret == WN_SUCCESS, "Unexpected return: %u\n", ret); ok(bufSize == 0, "Unexpected buffer size: %u\n", bufSize); if (ret == WN_SUCCESS) WNetCancelConnectionA(drive, TRUE); @@ -310,6 +311,7 @@ static void test_WNetUseConnection(void) ok(bufSize == 4, "Unexpected buffer size: %u\n", bufSize); if (ret == WN_SUCCESS) WNetCancelConnectionA(drive, TRUE); +end: HeapFree(GetProcessHeap(), 0, netRes); }
participants (1)
-
Alexandre Julliard