Commit 5d886557 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

crypt32: Remove unneeded casts.

parent 46b6f43f
...@@ -831,8 +831,7 @@ DWORD WINAPI CertGetPublicKeyLength(DWORD dwCertEncodingType, ...@@ -831,8 +831,7 @@ DWORD WINAPI CertGetPublicKeyLength(DWORD dwCertEncodingType,
if (ret) if (ret)
{ {
RSAPUBKEY *rsaPubKey = (RSAPUBKEY *)((LPBYTE)buf + RSAPUBKEY *rsaPubKey = (RSAPUBKEY *)(buf + sizeof(BLOBHEADER));
sizeof(BLOBHEADER));
len = rsaPubKey->bitlen; len = rsaPubKey->bitlen;
LocalFree(buf); LocalFree(buf);
......
...@@ -331,7 +331,7 @@ BOOL serialize(const struct protect_data_t *pInfo, DATA_BLOB *pSerial) ...@@ -331,7 +331,7 @@ BOOL serialize(const struct protect_data_t *pInfo, DATA_BLOB *pSerial)
if (ptr - pSerial->pbData != dwStruct) if (ptr - pSerial->pbData != dwStruct)
{ {
ERR("struct size changed!? %u != expected %u\n", ERR("struct size changed!? %u != expected %u\n",
ptr - pSerial->pbData, (unsigned int)dwStruct); ptr - pSerial->pbData, dwStruct);
LocalFree(pSerial->pbData); LocalFree(pSerial->pbData);
pSerial->pbData=NULL; pSerial->pbData=NULL;
pSerial->cbData=0; pSerial->cbData=0;
...@@ -476,8 +476,7 @@ BOOL unserialize(const DATA_BLOB *pSerial, struct protect_data_t *pInfo) ...@@ -476,8 +476,7 @@ BOOL unserialize(const DATA_BLOB *pSerial, struct protect_data_t *pInfo)
{ {
/* this is an impossible-to-reach test, but if the padding /* this is an impossible-to-reach test, but if the padding
* issue is ever understood, this may become more useful */ * issue is ever understood, this may become more useful */
ERR("loaded corrupt structure! (used %u expected %u)\n", ERR("loaded corrupt structure! (used %u expected %u)\n", index, size);
(unsigned int)index, (unsigned int)size);
status=FALSE; status=FALSE;
} }
...@@ -776,15 +775,15 @@ report(const DATA_BLOB* pDataIn, const DATA_BLOB* pOptionalEntropy, ...@@ -776,15 +775,15 @@ report(const DATA_BLOB* pDataIn, const DATA_BLOB* pOptionalEntropy,
TRACE("pPromptStruct: %p\n", pPromptStruct); TRACE("pPromptStruct: %p\n", pPromptStruct);
if (pPromptStruct) if (pPromptStruct)
{ {
TRACE(" cbSize: 0x%x\n",(unsigned int)pPromptStruct->cbSize); TRACE(" cbSize: 0x%x\n", pPromptStruct->cbSize);
TRACE(" dwPromptFlags: 0x%x\n",(unsigned int)pPromptStruct->dwPromptFlags); TRACE(" dwPromptFlags: 0x%x\n", pPromptStruct->dwPromptFlags);
TRACE(" hwndApp: %p\n", pPromptStruct->hwndApp); TRACE(" hwndApp: %p\n", pPromptStruct->hwndApp);
TRACE(" szPrompt: %p %s\n", TRACE(" szPrompt: %p %s\n",
pPromptStruct->szPrompt, pPromptStruct->szPrompt,
pPromptStruct->szPrompt ? debugstr_w(pPromptStruct->szPrompt) pPromptStruct->szPrompt ? debugstr_w(pPromptStruct->szPrompt)
: ""); : "");
} }
TRACE("dwFlags: 0x%04x\n",(unsigned int)dwFlags); TRACE("dwFlags: 0x%04x\n", dwFlags);
TRACE_DATA_BLOB(pDataIn); TRACE_DATA_BLOB(pDataIn);
if (pOptionalEntropy) if (pOptionalEntropy)
{ {
...@@ -893,7 +892,7 @@ BOOL WINAPI CryptProtectData(DATA_BLOB* pDataIn, ...@@ -893,7 +892,7 @@ BOOL WINAPI CryptProtectData(DATA_BLOB* pDataIn,
ERR("CryptEncrypt\n"); ERR("CryptEncrypt\n");
goto free_hash; goto free_hash;
} }
TRACE("required encrypted storage: %u\n",(unsigned int)dwLength); TRACE("required encrypted storage: %u\n", dwLength);
/* copy plain text into cipher area for CryptEncrypt call */ /* copy plain text into cipher area for CryptEncrypt call */
protect_data.cipher.cbData=dwLength; protect_data.cipher.cbData=dwLength;
...@@ -910,7 +909,7 @@ BOOL WINAPI CryptProtectData(DATA_BLOB* pDataIn, ...@@ -910,7 +909,7 @@ BOOL WINAPI CryptProtectData(DATA_BLOB* pDataIn,
if (!CryptEncrypt(hKey, hHash, TRUE, 0, protect_data.cipher.pbData, if (!CryptEncrypt(hKey, hHash, TRUE, 0, protect_data.cipher.pbData,
&dwLength, protect_data.cipher.cbData)) &dwLength, protect_data.cipher.cbData))
{ {
ERR("CryptEncrypt %u\n",(unsigned int)GetLastError()); ERR("CryptEncrypt %u\n", GetLastError());
goto free_hash; goto free_hash;
} }
protect_data.cipher.cbData=dwLength; protect_data.cipher.cbData=dwLength;
......
...@@ -521,7 +521,7 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreA(HCRYPTPROV hCryptProv, ...@@ -521,7 +521,7 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreA(HCRYPTPROV hCryptProv,
static void WINAPI CRYPT_MsgCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) static void WINAPI CRYPT_MsgCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
{ {
HCRYPTMSG msg = (HCRYPTMSG)hCertStore; HCRYPTMSG msg = hCertStore;
TRACE("(%p, %08x)\n", msg, dwFlags); TRACE("(%p, %08x)\n", msg, dwFlags);
CryptMsgClose(msg); CryptMsgClose(msg);
......
...@@ -622,7 +622,7 @@ static BOOL CRYPT_GetNextValueW(LPCWSTR str, DWORD dwFlags, LPCWSTR separators, ...@@ -622,7 +622,7 @@ static BOOL CRYPT_GetNextValueW(LPCWSTR str, DWORD dwFlags, LPCWSTR separators,
while (*separators) while (*separators)
map[*separators++] = 1; map[*separators++] = 1;
while (*str && (*str >= 0xff || !map[*(const unsigned short *)str])) while (*str && (*str >= 0xff || !map[*str]))
str++; str++;
token->end = str; token->end = str;
} }
......
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