Commit 84b0ed91 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

mpr/tests: Fix drive search loop.

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