Commit 9c7c9e54 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Change type to avoid unnecessary casting.

parent d187fcd1
......@@ -241,7 +241,7 @@ static BOOL CDataEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
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)
{
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
* always 0 (see rfc3852, section 7)
*/
ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&version,
sizeof(version));
ret = CRYPT_CopyParam(pvData, pcbData, &version, sizeof(version));
}
break;
default:
......@@ -887,7 +886,7 @@ static BOOL CSignedEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
pvData, pcbData);
break;
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));
break;
default:
......@@ -1495,8 +1494,7 @@ static BOOL CDecodeHashMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
switch (dwParamType)
{
case CMSG_TYPE_PARAM:
ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&msg->type,
sizeof(msg->type));
ret = CRYPT_CopyParam(pvData, pcbData, &msg->type, sizeof(msg->type));
break;
case CMSG_HASH_ALGORITHM_PARAM:
{
......@@ -1577,7 +1575,7 @@ static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
switch (dwParamType)
{
case CMSG_TYPE_PARAM:
ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&msg->type,
ret = CRYPT_CopyParam(pvData, pcbData, &msg->type,
sizeof(msg->type));
break;
default:
......
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