crypt32/tests: Avoid an always true ok() condition (PVS-Studio).

This commit is contained in:
Michael Stefaniuc 2014-11-02 22:28:15 +01:00 committed by Alexandre Julliard
parent a423cbdd5e
commit 25b4a92813
1 changed files with 2 additions and 14 deletions

View File

@ -390,20 +390,8 @@ static void testAddCTLToStore(void)
signedCTLWithCTLInnerContentAndBadSig, signedCTLWithCTLInnerContentAndBadSig,
sizeof(signedCTLWithCTLInnerContentAndBadSig), CERT_STORE_ADD_NEW, sizeof(signedCTLWithCTLInnerContentAndBadSig), CERT_STORE_ADD_NEW,
NULL); NULL);
if (ret) ok(!ret && (GetLastError() == CRYPT_E_EXISTS || GetLastError() == OSS_DATA_ERROR),
{ "expected CRYPT_E_EXISTS or OSS_DATA_ERROR, got %d %08x\n", ret, GetLastError());
/* win9x */
ok(GetLastError() == CRYPT_E_NOT_FOUND ||
GetLastError() == OSS_DATA_ERROR /* some win98 */,
"Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
}
else
{
ok(!ret && (GetLastError() == CRYPT_E_EXISTS ||
GetLastError() == OSS_DATA_ERROR),
"expected CRYPT_E_EXISTS or OSS_DATA_ERROR, got %d %08x\n", ret,
GetLastError());
}
CertCloseStore(store, 0); CertCloseStore(store, 0);
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0,