Michael Stefaniuc : crypt32: Remove superfluous casts of void pointers.

Alexandre Julliard julliard at winehq.org
Tue Nov 4 07:29:16 CST 2008


Module: wine
Branch: master
Commit: 7589715c8718dc31925ebbb5f5587a051aa59126
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7589715c8718dc31925ebbb5f5587a051aa59126

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Mon Nov  3 22:35:50 2008 +0100

crypt32: Remove superfluous casts of void pointers.

---

 dlls/crypt32/cert.c    |    7 +++----
 dlls/crypt32/context.c |    2 +-
 dlls/crypt32/crl.c     |    2 +-
 dlls/crypt32/ctl.c     |    3 +--
 dlls/crypt32/store.c   |    6 +++---
 5 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index 75d26a4..9cef6f8 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -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)
diff --git a/dlls/crypt32/context.c b/dlls/crypt32/context.c
index 959d0c9..fa08581 100644
--- a/dlls/crypt32/context.c
+++ b/dlls/crypt32/context.c
@@ -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;
diff --git a/dlls/crypt32/crl.c b/dlls/crypt32/crl.c
index 23c623f..9ae0d5d 100644
--- a/dlls/crypt32/crl.c
+++ b/dlls/crypt32/crl.c
@@ -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);
diff --git a/dlls/crypt32/ctl.c b/dlls/crypt32/ctl.c
index 9b6d2e0..ffac667 100644
--- a/dlls/crypt32/ctl.c
+++ b/dlls/crypt32/ctl.c
@@ -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);
diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c
index 834cc1d..1519c96 100644
--- a/dlls/crypt32/store.c
+++ b/dlls/crypt32/store.c
@@ -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;




More information about the wine-cvs mailing list