[PATCH] winhttp: On NULL request, skip the other tests (Coverity)

Marcus Meissner marcus at jet.franken.de
Wed Jan 27 13:59:03 CST 2010


Hi,

Skip the other tests using request when its NULL.

Ciao, Marcus
---
 dlls/winhttp/tests/winhttp.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 4a4e7f4..8e36fe4 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -283,6 +283,10 @@ static void test_SendRequest (void)
         goto done;
     }
     ok(request != NULL, "WinHttpOpenrequest failed to open a request, error: %u.\n", GetLastError());
+    if (!request) {
+        skip("Other failure, skipping.\n");
+        goto done;
+    }
 
     context = 0xdeadbeef;
     ret = WinHttpSetOption(request, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(context));
-- 
1.5.6



More information about the wine-patches mailing list