Andrew Talbot : crypt32: Remove unnecessary casts.

Alexandre Julliard julliard at winehq.org
Tue Dec 4 13:25:18 CST 2007


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

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Mon Dec  3 22:40:57 2007 +0000

crypt32: Remove unnecessary casts.

---

 dlls/crypt32/decode.c    |    2 +-
 dlls/crypt32/serialize.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c
index 3697c8a..be7e40f 100644
--- a/dlls/crypt32/decode.c
+++ b/dlls/crypt32/decode.c
@@ -715,7 +715,7 @@ static BOOL CRYPT_AsnDecodeArray(const struct AsnArrayDescriptor *arrayDesc,
                     else
                         array->rgItems = (BYTE *)array +
                          sizeof(struct GenericArray);
-                    nextData = (BYTE *)array->rgItems +
+                    nextData = array->rgItems +
                      array->cItems * arrayDesc->itemSize;
                     for (i = 0, ptr = pbEncoded + 1 + lenBytes; ret &&
                      i < cItems && ptr - pbEncoded - 1 - lenBytes <
diff --git a/dlls/crypt32/serialize.c b/dlls/crypt32/serialize.c
index 281ac3f..5017c3f 100644
--- a/dlls/crypt32/serialize.c
+++ b/dlls/crypt32/serialize.c
@@ -734,7 +734,7 @@ static BOOL CRYPT_SavePKCSToFile(HCERTSTORE store,
         {
             ret = CRYPT_SavePKCSToMem(store, dwMsgAndCertEncodingType, &blob);
             if (ret)
-                ret = WriteFile((HANDLE)handle, blob.pbData, blob.cbData,
+                ret = WriteFile(handle, blob.pbData, blob.cbData,
                  &blob.cbData, NULL);
         }
         else
@@ -750,7 +750,7 @@ static BOOL CRYPT_SavePKCSToFile(HCERTSTORE store,
 static BOOL CRYPT_SaveSerializedToFile(HCERTSTORE store,
  DWORD dwMsgAndCertEncodingType, void *handle)
 {
-    return CRYPT_WriteSerializedStoreToFile((HANDLE)handle, store);
+    return CRYPT_WriteSerializedStoreToFile(handle, store);
 }
 
 struct MemWrittenTracker
@@ -847,7 +847,7 @@ BOOL WINAPI CertSaveStore(HCERTSTORE hCertStore, DWORD dwMsgAndCertEncodingType,
     switch (dwSaveTo)
     {
     case CERT_STORE_SAVE_TO_FILE:
-        handle = (HANDLE)pvSaveToPara;
+        handle = pvSaveToPara;
         saveFunc = dwSaveAs == CERT_STORE_SAVE_AS_STORE ?
          CRYPT_SaveSerializedToFile : CRYPT_SavePKCSToFile;
         break;




More information about the wine-cvs mailing list