From 35bc0c798a37fe2283a75b717539a2ac722e47aa Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 19 Jun 2009 15:10:17 +0200 Subject: [PATCH] urlmon/tests: Avoid comparing uninitialized structure data. --- dlls/urlmon/tests/protocol.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c index 50820e8de9a..44276b11830 100644 --- a/dlls/urlmon/tests/protocol.c +++ b/dlls/urlmon/tests/protocol.c @@ -438,7 +438,14 @@ static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOL ok(pProtocolData != NULL, "pProtocolData == NULL\n"); if(binding_test) { ok(pProtocolData != &protocoldata, "pProtocolData == &protocoldata\n"); - ok(!memcmp(pProtocolData, &protocoldata, sizeof(PROTOCOLDATA)), "*pProtocolData != protocoldata\n"); + ok(pProtocolData->grfFlags == protocoldata.grfFlags, "grfFlags wrong %x/%x\n", + pProtocolData->grfFlags, protocoldata.grfFlags ); + ok(pProtocolData->dwState == protocoldata.dwState, "dwState wrong %x/%x\n", + pProtocolData->dwState, protocoldata.dwState ); + ok(pProtocolData->pData == protocoldata.pData, "pData wrong %p/%p\n", + pProtocolData->pData, protocoldata.pData ); + ok(pProtocolData->cbData == protocoldata.cbData, "cbData wrong %x/%x\n", + pProtocolData->cbData, protocoldata.cbData ); } pdata = pProtocolData; @@ -1327,7 +1334,14 @@ static HRESULT WINAPI ProtocolEmul_Continue(IInternetProtocol *iface, return S_OK; if(binding_test) { ok(pProtocolData != &protocoldata, "pProtocolData == &protocoldata\n"); - ok(!memcmp(pProtocolData, &protocoldata, sizeof(PROTOCOLDATA)), "*pProtocolData != protocoldata\n"); + ok(pProtocolData->grfFlags == protocoldata.grfFlags, "grfFlags wrong %x/%x\n", + pProtocolData->grfFlags, protocoldata.grfFlags ); + ok(pProtocolData->dwState == protocoldata.dwState, "dwState wrong %x/%x\n", + pProtocolData->dwState, protocoldata.dwState ); + ok(pProtocolData->pData == protocoldata.pData, "pData wrong %p/%p\n", + pProtocolData->pData, protocoldata.pData ); + ok(pProtocolData->cbData == protocoldata.cbData, "cbData wrong %x/%x\n", + pProtocolData->cbData, protocoldata.cbData ); } switch(prot_state) {