crypt32: Remove superfluous casts of void pointers.

This commit is contained in:
Michael Stefaniuc 2008-11-03 22:35:50 +01:00 committed by Alexandre Julliard
parent 3d6e19d48a
commit 7589715c87
5 changed files with 9 additions and 11 deletions

View File

@ -88,7 +88,7 @@ PCCERT_CONTEXT WINAPI CertCreateCertificateContext(DWORD dwCertEncodingType,
{
BYTE *data = NULL;
cert = (PCERT_CONTEXT)Context_CreateDataContext(sizeof(CERT_CONTEXT));
cert = Context_CreateDataContext(sizeof(CERT_CONTEXT));
if (!cert)
goto end;
data = CryptMemAlloc(cbCertEncoded);
@ -601,7 +601,7 @@ static BOOL CRYPT_AcquirePrivateKeyFromProvInfo(PCCERT_CONTEXT pCert,
CERT_KEY_PROV_INFO_PROP_ID, 0, &size);
if (ret)
{
info = (PCRYPT_KEY_PROV_INFO)HeapAlloc(GetProcessHeap(), 0, size);
info = HeapAlloc(GetProcessHeap(), 0, size);
if (info)
{
ret = CertGetCertificateContextProperty(pCert,
@ -661,8 +661,7 @@ BOOL WINAPI CryptAcquireCertificatePrivateKey(PCCERT_CONTEXT pCert,
CERT_KEY_PROV_INFO_PROP_ID, 0, &size);
if (ret)
{
info = (PCRYPT_KEY_PROV_INFO)HeapAlloc(
GetProcessHeap(), 0, size);
info = HeapAlloc(GetProcessHeap(), 0, size);
ret = CertGetCertificateContextProperty(pCert,
CERT_KEY_PROV_INFO_PROP_ID, info, &size);
if (ret)

View File

@ -207,7 +207,7 @@ static inline struct list *ContextList_ContextToEntry(struct ContextList *list,
struct list *ret;
if (context)
ret = (struct list *)Context_GetExtra(context, list->contextSize);
ret = Context_GetExtra(context, list->contextSize);
else
ret = NULL;
return ret;

View File

@ -50,7 +50,7 @@ PCCRL_CONTEXT WINAPI CertCreateCRLContext(DWORD dwCertEncodingType,
{
BYTE *data = NULL;
crl = (PCRL_CONTEXT)Context_CreateDataContext(sizeof(CRL_CONTEXT));
crl = Context_CreateDataContext(sizeof(CRL_CONTEXT));
if (!crl)
goto end;
data = CryptMemAlloc(cbCrlEncoded);

View File

@ -382,8 +382,7 @@ PCCTL_CONTEXT WINAPI CertCreateCTLContext(DWORD dwMsgAndCertEncodingType,
(BYTE *)&ctlInfo, &size);
if (ret)
{
ctl = (PCTL_CONTEXT)Context_CreateDataContext(
sizeof(CTL_CONTEXT));
ctl = Context_CreateDataContext(sizeof(CTL_CONTEXT));
if (ctl)
{
BYTE *data = CryptMemAlloc(cbCtlEncoded);

View File

@ -156,7 +156,7 @@ static BOOL CRYPT_MemAddCert(PWINECRYPT_CERTSTORE store, void *cert,
TRACE("(%p, %p, %p, %p)\n", store, cert, toReplace, ppStoreContext);
context = (PCERT_CONTEXT)ContextList_Add(ms->certs, cert, toReplace);
context = ContextList_Add(ms->certs, cert, toReplace);
if (context)
{
context->hCertStore = store;
@ -197,7 +197,7 @@ static BOOL CRYPT_MemAddCrl(PWINECRYPT_CERTSTORE store, void *crl,
TRACE("(%p, %p, %p, %p)\n", store, crl, toReplace, ppStoreContext);
context = (PCRL_CONTEXT)ContextList_Add(ms->crls, crl, toReplace);
context = ContextList_Add(ms->crls, crl, toReplace);
if (context)
{
context->hCertStore = store;
@ -238,7 +238,7 @@ static BOOL CRYPT_MemAddCtl(PWINECRYPT_CERTSTORE store, void *ctl,
TRACE("(%p, %p, %p, %p)\n", store, ctl, toReplace, ppStoreContext);
context = (PCTL_CONTEXT)ContextList_Add(ms->ctls, ctl, toReplace);
context = ContextList_Add(ms->ctls, ctl, toReplace);
if (context)
{
context->hCertStore = store;