Commit a28052ab authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

cryptnet: Remove superfluous pointer casts.

parent 357c3f4a
...@@ -136,7 +136,7 @@ static BOOL WINAPI CRYPT_GetUrlFromCertificateCRLDistPoint(LPCSTR pszUrlOid, ...@@ -136,7 +136,7 @@ static BOOL WINAPI CRYPT_GetUrlFromCertificateCRLDistPoint(LPCSTR pszUrlOid,
LPVOID pvPara, DWORD dwFlags, PCRYPT_URL_ARRAY pUrlArray, DWORD *pcbUrlArray, LPVOID pvPara, DWORD dwFlags, PCRYPT_URL_ARRAY pUrlArray, DWORD *pcbUrlArray,
PCRYPT_URL_INFO pUrlInfo, DWORD *pcbUrlInfo, LPVOID pvReserved) PCRYPT_URL_INFO pUrlInfo, DWORD *pcbUrlInfo, LPVOID pvReserved)
{ {
PCCERT_CONTEXT cert = (PCCERT_CONTEXT)pvPara; PCCERT_CONTEXT cert = pvPara;
PCERT_EXTENSION ext; PCERT_EXTENSION ext;
BOOL ret = FALSE; BOOL ret = FALSE;
...@@ -686,7 +686,7 @@ static void CALLBACK CRYPT_InetStatusCallback(HINTERNET hInt, ...@@ -686,7 +686,7 @@ static void CALLBACK CRYPT_InetStatusCallback(HINTERNET hInt,
switch (status) switch (status)
{ {
case INTERNET_STATUS_REQUEST_COMPLETE: case INTERNET_STATUS_REQUEST_COMPLETE:
result = (LPINTERNET_ASYNC_RESULT)statusInfo; result = statusInfo;
context->error = result->dwError; context->error = result->dwError;
SetEvent(context->event); SetEvent(context->event);
} }
...@@ -1244,17 +1244,17 @@ static BOOL WINAPI CRYPT_CreateAny(LPCSTR pszObjectOid, ...@@ -1244,17 +1244,17 @@ static BOOL WINAPI CRYPT_CreateAny(LPCSTR pszObjectOid,
{ {
case CERT_QUERY_CONTENT_CERT: case CERT_QUERY_CONTENT_CERT:
if (!CertAddCertificateContextToStore(store, if (!CertAddCertificateContextToStore(store,
(PCCERT_CONTEXT)context, CERT_STORE_ADD_ALWAYS, NULL)) context, CERT_STORE_ADD_ALWAYS, NULL))
ret = FALSE; ret = FALSE;
break; break;
case CERT_QUERY_CONTENT_CRL: case CERT_QUERY_CONTENT_CRL:
if (!CertAddCRLContextToStore(store, if (!CertAddCRLContextToStore(store,
(PCCRL_CONTEXT)context, CERT_STORE_ADD_ALWAYS, NULL)) context, CERT_STORE_ADD_ALWAYS, NULL))
ret = FALSE; ret = FALSE;
break; break;
case CERT_QUERY_CONTENT_CTL: case CERT_QUERY_CONTENT_CTL:
if (!CertAddCTLContextToStore(store, if (!CertAddCTLContextToStore(store,
(PCCTL_CONTEXT)context, CERT_STORE_ADD_ALWAYS, NULL)) context, CERT_STORE_ADD_ALWAYS, NULL))
ret = FALSE; ret = FALSE;
break; break;
default: default:
...@@ -1327,7 +1327,7 @@ typedef BOOL (*get_object_expiration_func)(void *pvContext, ...@@ -1327,7 +1327,7 @@ typedef BOOL (*get_object_expiration_func)(void *pvContext,
static BOOL CRYPT_GetExpirationFromCert(void *pvObject, FILETIME *expiration) static BOOL CRYPT_GetExpirationFromCert(void *pvObject, FILETIME *expiration)
{ {
PCCERT_CONTEXT cert = (PCCERT_CONTEXT)pvObject; PCCERT_CONTEXT cert = pvObject;
*expiration = cert->pCertInfo->NotAfter; *expiration = cert->pCertInfo->NotAfter;
return TRUE; return TRUE;
...@@ -1335,7 +1335,7 @@ static BOOL CRYPT_GetExpirationFromCert(void *pvObject, FILETIME *expiration) ...@@ -1335,7 +1335,7 @@ static BOOL CRYPT_GetExpirationFromCert(void *pvObject, FILETIME *expiration)
static BOOL CRYPT_GetExpirationFromCRL(void *pvObject, FILETIME *expiration) static BOOL CRYPT_GetExpirationFromCRL(void *pvObject, FILETIME *expiration)
{ {
PCCRL_CONTEXT cert = (PCCRL_CONTEXT)pvObject; PCCRL_CONTEXT cert = pvObject;
*expiration = cert->pCrlInfo->NextUpdate; *expiration = cert->pCrlInfo->NextUpdate;
return TRUE; return TRUE;
...@@ -1343,7 +1343,7 @@ static BOOL CRYPT_GetExpirationFromCRL(void *pvObject, FILETIME *expiration) ...@@ -1343,7 +1343,7 @@ static BOOL CRYPT_GetExpirationFromCRL(void *pvObject, FILETIME *expiration)
static BOOL CRYPT_GetExpirationFromCTL(void *pvObject, FILETIME *expiration) static BOOL CRYPT_GetExpirationFromCTL(void *pvObject, FILETIME *expiration)
{ {
PCCTL_CONTEXT cert = (PCCTL_CONTEXT)pvObject; PCCTL_CONTEXT cert = pvObject;
*expiration = cert->pCtlInfo->NextUpdate; *expiration = cert->pCtlInfo->NextUpdate;
return TRUE; return TRUE;
...@@ -1518,7 +1518,7 @@ BOOL WINAPI CertDllVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType, ...@@ -1518,7 +1518,7 @@ BOOL WINAPI CertDllVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType,
PCRL_ENTRY entry = NULL; PCRL_ENTRY entry = NULL;
CertFindCertificateInCRL( CertFindCertificateInCRL(
(PCCERT_CONTEXT)rgpvContext[i], crl, 0, NULL, rgpvContext[i], crl, 0, NULL,
&entry); &entry);
if (entry) if (entry)
{ {
......
...@@ -329,7 +329,7 @@ static void test_retrieveObjectByUrl(void) ...@@ -329,7 +329,7 @@ static void test_retrieveObjectByUrl(void)
CertFreeCRLContext(crl); CertFreeCRLContext(crl);
store = (HCERTSTORE)0xdeadbeef; store = (HCERTSTORE)0xdeadbeef;
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CAPI2_ANY, 0, 0, ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CAPI2_ANY, 0, 0,
(void **)&store, NULL, NULL, NULL, NULL); &store, NULL, NULL, NULL, NULL);
ok(ret, "CryptRetrieveObjectByUrlA failed: %d\n", GetLastError()); ok(ret, "CryptRetrieveObjectByUrlA failed: %d\n", GetLastError());
if (store && store != (HCERTSTORE)0xdeadbeef) if (store && store != (HCERTSTORE)0xdeadbeef)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment