[PATCH] mpr/tests: Fix drive search loop.
Zebediah Figura
z.figura12 at gmail.com
Tue Jan 2 00:33:48 CST 2018
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
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);
}
--
2.7.4
More information about the wine-devel
mailing list