Commit 0087064c authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

wintrust: Remove superfluous pointer casts.

parent 30a37b65
...@@ -795,7 +795,7 @@ HRESULT WINAPI GenericChainCertificateTrust(CRYPT_PROVIDER_DATA *data) ...@@ -795,7 +795,7 @@ HRESULT WINAPI GenericChainCertificateTrust(CRYPT_PROVIDER_DATA *data)
{ {
BOOL ret; BOOL ret;
WTD_GENERIC_CHAIN_POLICY_DATA *policyData = WTD_GENERIC_CHAIN_POLICY_DATA *policyData =
(WTD_GENERIC_CHAIN_POLICY_DATA *)data->pWintrustData->pPolicyCallbackData; data->pWintrustData->pPolicyCallbackData;
TRACE("(%p)\n", data); TRACE("(%p)\n", data);
...@@ -961,7 +961,7 @@ HRESULT WINAPI GenericChainFinalProv(CRYPT_PROVIDER_DATA *data) ...@@ -961,7 +961,7 @@ HRESULT WINAPI GenericChainFinalProv(CRYPT_PROVIDER_DATA *data)
{ {
HRESULT err = NO_ERROR; /* not a typo, MS confused the types */ HRESULT err = NO_ERROR; /* not a typo, MS confused the types */
WTD_GENERIC_CHAIN_POLICY_DATA *policyData = WTD_GENERIC_CHAIN_POLICY_DATA *policyData =
(WTD_GENERIC_CHAIN_POLICY_DATA *)data->pWintrustData->pPolicyCallbackData; data->pWintrustData->pPolicyCallbackData;
TRACE("(%p)\n", data); TRACE("(%p)\n", data);
......
...@@ -184,7 +184,7 @@ static LONG WINTRUST_DefaultVerify(HWND hwnd, GUID *actionID, ...@@ -184,7 +184,7 @@ static LONG WINTRUST_DefaultVerify(HWND hwnd, GUID *actionID,
goto error; goto error;
} }
data->hWVTStateData = (HANDLE)provData; data->hWVTStateData = provData;
provData->pWintrustData = data; provData->pWintrustData = data;
if (hwnd == INVALID_HANDLE_VALUE) if (hwnd == INVALID_HANDLE_VALUE)
provData->hWndParent = GetDesktopWindow(); provData->hWndParent = GetDesktopWindow();
...@@ -215,7 +215,7 @@ static LONG WINTRUST_DefaultClose(HWND hwnd, GUID *actionID, ...@@ -215,7 +215,7 @@ static LONG WINTRUST_DefaultClose(HWND hwnd, GUID *actionID,
WINTRUST_DATA *data) WINTRUST_DATA *data)
{ {
DWORD err = ERROR_SUCCESS; DWORD err = ERROR_SUCCESS;
CRYPT_PROVIDER_DATA *provData = (CRYPT_PROVIDER_DATA *)data->hWVTStateData; CRYPT_PROVIDER_DATA *provData = data->hWVTStateData;
TRACE("(%p, %s, %p)\n", hwnd, debugstr_guid(actionID), data); TRACE("(%p, %s, %p)\n", hwnd, debugstr_guid(actionID), data);
...@@ -254,8 +254,7 @@ static LONG WINTRUST_PublishedSoftware(HWND hwnd, GUID *actionID, ...@@ -254,8 +254,7 @@ static LONG WINTRUST_PublishedSoftware(HWND hwnd, GUID *actionID,
/* Undocumented: the published software action is passed a path, /* Undocumented: the published software action is passed a path,
* and pSIPClientData points to a WIN_TRUST_SUBJECT_FILE. * and pSIPClientData points to a WIN_TRUST_SUBJECT_FILE.
*/ */
LPWIN_TRUST_SUBJECT_FILE subjectFile = LPWIN_TRUST_SUBJECT_FILE subjectFile = data->pSIPClientData;
(LPWIN_TRUST_SUBJECT_FILE)data->pSIPClientData;
WINTRUST_FILE_INFO fileInfo = { sizeof(fileInfo), 0 }; WINTRUST_FILE_INFO fileInfo = { sizeof(fileInfo), 0 };
TRACE("subjectFile->hFile: %p\n", subjectFile->hFile); TRACE("subjectFile->hFile: %p\n", subjectFile->hFile);
...@@ -377,7 +376,7 @@ static LONG WINTRUST_CertVerify(HWND hwnd, GUID *actionID, ...@@ -377,7 +376,7 @@ static LONG WINTRUST_CertVerify(HWND hwnd, GUID *actionID,
/* Not sure why, but native skips the policy check */ /* Not sure why, but native skips the policy check */
provData->psPfns->pfnCertCheckPolicy = NULL; provData->psPfns->pfnCertCheckPolicy = NULL;
data->hWVTStateData = (HANDLE)provData; data->hWVTStateData = provData;
provData->pWintrustData = data; provData->pWintrustData = data;
if (hwnd == INVALID_HANDLE_VALUE) if (hwnd == INVALID_HANDLE_VALUE)
provData->hWndParent = GetDesktopWindow(); provData->hWndParent = GetDesktopWindow();
...@@ -584,7 +583,7 @@ LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, LPVOID ActionData ) ...@@ -584,7 +583,7 @@ LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, LPVOID ActionData )
static const GUID generic_chain_verify = WINTRUST_ACTION_GENERIC_CHAIN_VERIFY; static const GUID generic_chain_verify = WINTRUST_ACTION_GENERIC_CHAIN_VERIFY;
static const GUID cert_action_verify = CERT_CERTIFICATE_ACTION_VERIFY; static const GUID cert_action_verify = CERT_CERTIFICATE_ACTION_VERIFY;
LONG err = ERROR_SUCCESS; LONG err = ERROR_SUCCESS;
WINTRUST_DATA *actionData = (WINTRUST_DATA *)ActionData; WINTRUST_DATA *actionData = ActionData;
TRACE("(%p, %s, %p)\n", hwnd, debugstr_guid(ActionID), ActionData); TRACE("(%p, %s, %p)\n", hwnd, debugstr_guid(ActionID), ActionData);
dump_wintrust_data(ActionData); dump_wintrust_data(ActionData);
...@@ -709,7 +708,7 @@ CRYPT_PROVIDER_PRIVDATA *WINAPI WTHelperGetProvPrivateDataFromChain( ...@@ -709,7 +708,7 @@ CRYPT_PROVIDER_PRIVDATA *WINAPI WTHelperGetProvPrivateDataFromChain(
CRYPT_PROVIDER_DATA * WINAPI WTHelperProvDataFromStateData(HANDLE hStateData) CRYPT_PROVIDER_DATA * WINAPI WTHelperProvDataFromStateData(HANDLE hStateData)
{ {
TRACE("%p\n", hStateData); TRACE("%p\n", hStateData);
return (CRYPT_PROVIDER_DATA *)hStateData; return hStateData;
} }
/*********************************************************************** /***********************************************************************
...@@ -738,7 +737,7 @@ HANDLE WINAPI WTHelperGetFileHandle(WINTRUST_DATA *data) ...@@ -738,7 +737,7 @@ HANDLE WINAPI WTHelperGetFileHandle(WINTRUST_DATA *data)
static BOOL WINAPI WINTRUST_enumUsages(PCCRYPT_OID_INFO pInfo, void *pvArg) static BOOL WINAPI WINTRUST_enumUsages(PCCRYPT_OID_INFO pInfo, void *pvArg)
{ {
PCCRYPT_OID_INFO **usages = (PCCRYPT_OID_INFO **)pvArg; PCCRYPT_OID_INFO **usages = pvArg;
DWORD cUsages; DWORD cUsages;
BOOL ret; BOOL ret;
...@@ -756,7 +755,7 @@ static BOOL WINAPI WINTRUST_enumUsages(PCCRYPT_OID_INFO pInfo, void *pvArg) ...@@ -756,7 +755,7 @@ static BOOL WINAPI WINTRUST_enumUsages(PCCRYPT_OID_INFO pInfo, void *pvArg)
*/ */
for (cUsages = 0, ptr = *usages; *ptr; ptr++, cUsages++) for (cUsages = 0, ptr = *usages; *ptr; ptr++, cUsages++)
; ;
*usages = WINTRUST_ReAlloc((CRYPT_OID_INFO *)*usages, *usages = WINTRUST_ReAlloc(*usages,
(cUsages + 2) * sizeof(PCCRYPT_OID_INFO)); (cUsages + 2) * sizeof(PCCRYPT_OID_INFO));
} }
if (*usages) if (*usages)
...@@ -809,7 +808,7 @@ BOOL WINAPI WTHelperGetKnownUsages(DWORD action, PCCRYPT_OID_INFO **usages) ...@@ -809,7 +808,7 @@ BOOL WINAPI WTHelperGetKnownUsages(DWORD action, PCCRYPT_OID_INFO **usages)
} }
else if (action == 2) else if (action == 2)
{ {
WINTRUST_Free((CRYPT_OID_INFO *)*usages); WINTRUST_Free(*usages);
*usages = NULL; *usages = NULL;
ret = TRUE; ret = TRUE;
} }
......
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