mpr/tests: Fix drive search loop.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-01-02 00:33:48 -06:00 committed by Alexandre Julliard
parent 7fad896f29
commit 84b0ed9161
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}