crypt32: Change type to avoid unnecessary casting.
This commit is contained in:
parent
d187fcd172
commit
9c7c9e545e
|
@ -241,7 +241,7 @@ static BOOL CDataEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL CRYPT_CopyParam(void *pvData, DWORD *pcbData, const BYTE *src,
|
static BOOL CRYPT_CopyParam(void *pvData, DWORD *pcbData, const void *src,
|
||||||
DWORD len)
|
DWORD len)
|
||||||
{
|
{
|
||||||
BOOL ret = TRUE;
|
BOOL ret = TRUE;
|
||||||
|
@ -444,8 +444,7 @@ static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
||||||
/* Since the data are always encoded as octets, the version is
|
/* Since the data are always encoded as octets, the version is
|
||||||
* always 0 (see rfc3852, section 7)
|
* always 0 (see rfc3852, section 7)
|
||||||
*/
|
*/
|
||||||
ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&version,
|
ret = CRYPT_CopyParam(pvData, pcbData, &version, sizeof(version));
|
||||||
sizeof(version));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -887,7 +886,7 @@ static BOOL CSignedEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
||||||
pvData, pcbData);
|
pvData, pcbData);
|
||||||
break;
|
break;
|
||||||
case CMSG_VERSION_PARAM:
|
case CMSG_VERSION_PARAM:
|
||||||
ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&msg->info.version,
|
ret = CRYPT_CopyParam(pvData, pcbData, &msg->info.version,
|
||||||
sizeof(msg->info.version));
|
sizeof(msg->info.version));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1495,8 +1494,7 @@ static BOOL CDecodeHashMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
|
||||||
switch (dwParamType)
|
switch (dwParamType)
|
||||||
{
|
{
|
||||||
case CMSG_TYPE_PARAM:
|
case CMSG_TYPE_PARAM:
|
||||||
ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&msg->type,
|
ret = CRYPT_CopyParam(pvData, pcbData, &msg->type, sizeof(msg->type));
|
||||||
sizeof(msg->type));
|
|
||||||
break;
|
break;
|
||||||
case CMSG_HASH_ALGORITHM_PARAM:
|
case CMSG_HASH_ALGORITHM_PARAM:
|
||||||
{
|
{
|
||||||
|
@ -1577,7 +1575,7 @@ static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
||||||
switch (dwParamType)
|
switch (dwParamType)
|
||||||
{
|
{
|
||||||
case CMSG_TYPE_PARAM:
|
case CMSG_TYPE_PARAM:
|
||||||
ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&msg->type,
|
ret = CRYPT_CopyParam(pvData, pcbData, &msg->type,
|
||||||
sizeof(msg->type));
|
sizeof(msg->type));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue