mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 02:18:20 +00:00
crypt32: Remove unneeded casts.
This commit is contained in:
parent
46b6f43fa0
commit
5d886557df
|
@ -831,8 +831,7 @@ DWORD WINAPI CertGetPublicKeyLength(DWORD dwCertEncodingType,
|
|||
|
||||
if (ret)
|
||||
{
|
||||
RSAPUBKEY *rsaPubKey = (RSAPUBKEY *)((LPBYTE)buf +
|
||||
sizeof(BLOBHEADER));
|
||||
RSAPUBKEY *rsaPubKey = (RSAPUBKEY *)(buf + sizeof(BLOBHEADER));
|
||||
|
||||
len = rsaPubKey->bitlen;
|
||||
LocalFree(buf);
|
||||
|
|
|
@ -331,7 +331,7 @@ BOOL serialize(const struct protect_data_t *pInfo, DATA_BLOB *pSerial)
|
|||
if (ptr - pSerial->pbData != dwStruct)
|
||||
{
|
||||
ERR("struct size changed!? %u != expected %u\n",
|
||||
ptr - pSerial->pbData, (unsigned int)dwStruct);
|
||||
ptr - pSerial->pbData, dwStruct);
|
||||
LocalFree(pSerial->pbData);
|
||||
pSerial->pbData=NULL;
|
||||
pSerial->cbData=0;
|
||||
|
@ -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
|
||||
* issue is ever understood, this may become more useful */
|
||||
ERR("loaded corrupt structure! (used %u expected %u)\n",
|
||||
(unsigned int)index, (unsigned int)size);
|
||||
ERR("loaded corrupt structure! (used %u expected %u)\n", index, size);
|
||||
status=FALSE;
|
||||
}
|
||||
|
||||
|
@ -776,15 +775,15 @@ report(const DATA_BLOB* pDataIn, const DATA_BLOB* pOptionalEntropy,
|
|||
TRACE("pPromptStruct: %p\n", pPromptStruct);
|
||||
if (pPromptStruct)
|
||||
{
|
||||
TRACE(" cbSize: 0x%x\n",(unsigned int)pPromptStruct->cbSize);
|
||||
TRACE(" dwPromptFlags: 0x%x\n",(unsigned int)pPromptStruct->dwPromptFlags);
|
||||
TRACE(" cbSize: 0x%x\n", pPromptStruct->cbSize);
|
||||
TRACE(" dwPromptFlags: 0x%x\n", pPromptStruct->dwPromptFlags);
|
||||
TRACE(" hwndApp: %p\n", pPromptStruct->hwndApp);
|
||||
TRACE(" szPrompt: %p %s\n",
|
||||
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);
|
||||
if (pOptionalEntropy)
|
||||
{
|
||||
|
@ -893,7 +892,7 @@ BOOL WINAPI CryptProtectData(DATA_BLOB* pDataIn,
|
|||
ERR("CryptEncrypt\n");
|
||||
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 */
|
||||
protect_data.cipher.cbData=dwLength;
|
||||
|
@ -910,7 +909,7 @@ BOOL WINAPI CryptProtectData(DATA_BLOB* pDataIn,
|
|||
if (!CryptEncrypt(hKey, hHash, TRUE, 0, protect_data.cipher.pbData,
|
||||
&dwLength, protect_data.cipher.cbData))
|
||||
{
|
||||
ERR("CryptEncrypt %u\n",(unsigned int)GetLastError());
|
||||
ERR("CryptEncrypt %u\n", GetLastError());
|
||||
goto free_hash;
|
||||
}
|
||||
protect_data.cipher.cbData=dwLength;
|
||||
|
|
|
@ -521,7 +521,7 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreA(HCRYPTPROV hCryptProv,
|
|||
|
||||
static void WINAPI CRYPT_MsgCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
|
||||
{
|
||||
HCRYPTMSG msg = (HCRYPTMSG)hCertStore;
|
||||
HCRYPTMSG msg = hCertStore;
|
||||
|
||||
TRACE("(%p, %08x)\n", msg, dwFlags);
|
||||
CryptMsgClose(msg);
|
||||
|
|
|
@ -622,7 +622,7 @@ static BOOL CRYPT_GetNextValueW(LPCWSTR str, DWORD dwFlags, LPCWSTR separators,
|
|||
|
||||
while (*separators)
|
||||
map[*separators++] = 1;
|
||||
while (*str && (*str >= 0xff || !map[*(const unsigned short *)str]))
|
||||
while (*str && (*str >= 0xff || !map[*str]))
|
||||
str++;
|
||||
token->end = str;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue