advapi32: Remove wrong "is NULL and error out" code (coccicheck).
This commit is contained in:
parent
cd22aa18a6
commit
b856884c3b
|
@ -1420,11 +1420,6 @@ BOOL WINAPI CryptGenKey (HCRYPTPROV hProv, ALG_ID Algid, DWORD dwFlags, HCRYPTKE
|
|||
|
||||
TRACE("(0x%lx, %d, %08x, %p)\n", hProv, Algid, dwFlags, phKey);
|
||||
|
||||
if (!prov)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (!phKey || !prov || prov->dwMagic != MAGIC_CRYPTPROV)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
|
|
|
@ -238,6 +238,9 @@ static void test_incorrect_api_usage(void)
|
|||
if (!result) return;
|
||||
pCryptDestroyHash(hHash);
|
||||
|
||||
result = pCryptGenKey(0, CALG_RC4, 0, &hKey);
|
||||
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
|
||||
|
||||
result = pCryptGenKey(hProv, CALG_RC4, 0, &hKey);
|
||||
ok (result, "%d\n", GetLastError());
|
||||
if (!result) return;
|
||||
|
|
Loading…
Reference in New Issue