advapi32: Remove superfluous pointer casts.
This commit is contained in:
parent
d10ca7d9c4
commit
6a48bb4217
|
@ -74,7 +74,7 @@ static DWORD read_credential_blob(HKEY hkey, const BYTE key_data[KEY_SIZE],
|
|||
struct ustring data;
|
||||
struct ustring key;
|
||||
|
||||
ret = RegQueryValueExW(hkey, wszPasswordValue, 0, &type, (LPVOID)credential_blob,
|
||||
ret = RegQueryValueExW(hkey, wszPasswordValue, 0, &type, credential_blob,
|
||||
credential_blob_size);
|
||||
if (ret != ERROR_SUCCESS)
|
||||
return ret;
|
||||
|
@ -460,7 +460,7 @@ static DWORD write_credential_blob(HKEY hkey, LPCWSTR target_name, DWORD type,
|
|||
data.Buffer = encrypted_credential_blob;
|
||||
SystemFunction032(&data, &key);
|
||||
|
||||
ret = RegSetValueExW(hkey, wszPasswordValue, 0, REG_BINARY, (LPVOID)encrypted_credential_blob, credential_blob_size);
|
||||
ret = RegSetValueExW(hkey, wszPasswordValue, 0, REG_BINARY, encrypted_credential_blob, credential_blob_size);
|
||||
HeapFree(GetProcessHeap(), 0, encrypted_credential_blob);
|
||||
|
||||
return ret;
|
||||
|
@ -647,7 +647,7 @@ static DWORD get_cred_mgr_encryption_key(HKEY hkeyMgr, BYTE key_data[KEY_SIZE])
|
|||
memcpy(key_data, my_key_data, KEY_SIZE);
|
||||
|
||||
count = KEY_SIZE;
|
||||
ret = RegQueryValueExW(hkeyMgr, wszEncryptionKeyValue, NULL, &type, (LPVOID)key_data,
|
||||
ret = RegQueryValueExW(hkeyMgr, wszEncryptionKeyValue, NULL, &type, key_data,
|
||||
&count);
|
||||
if (ret == ERROR_SUCCESS)
|
||||
{
|
||||
|
@ -668,14 +668,14 @@ static DWORD get_cred_mgr_encryption_key(HKEY hkeyMgr, BYTE key_data[KEY_SIZE])
|
|||
*(DWORD *)(key_data + 4) = value;
|
||||
|
||||
ret = RegSetValueExW(hkeyMgr, wszEncryptionKeyValue, 0, REG_BINARY,
|
||||
(LPVOID)key_data, KEY_SIZE);
|
||||
key_data, KEY_SIZE);
|
||||
if (ret == ERROR_ACCESS_DENIED)
|
||||
{
|
||||
ret = open_cred_mgr_key(&hkeyMgr, TRUE);
|
||||
if (ret == ERROR_SUCCESS)
|
||||
{
|
||||
ret = RegSetValueExW(hkeyMgr, wszEncryptionKeyValue, 0, REG_BINARY,
|
||||
(LPVOID)key_data, KEY_SIZE);
|
||||
key_data, KEY_SIZE);
|
||||
RegCloseKey(hkeyMgr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt);
|
|||
static HWND crypt_hWindow;
|
||||
|
||||
#define CRYPT_Alloc(size) (LocalAlloc(LMEM_ZEROINIT, size))
|
||||
#define CRYPT_Free(buffer) (LocalFree((HLOCAL)buffer))
|
||||
#define CRYPT_Free(buffer) (LocalFree(buffer))
|
||||
|
||||
static inline PWSTR CRYPT_GetProvKeyName(PCWSTR pProvName)
|
||||
{
|
||||
|
|
|
@ -341,7 +341,7 @@ static const WCHAR SDDL_AUDIT_FAILURE[] = {'F','A',0};
|
|||
const char * debugstr_sid(PSID sid)
|
||||
{
|
||||
int auth = 0;
|
||||
SID * psid = (SID *)sid;
|
||||
SID * psid = sid;
|
||||
|
||||
if (psid == NULL)
|
||||
return "(null)";
|
||||
|
@ -3172,7 +3172,7 @@ VOID WINAPI BuildTrusteeWithSidA(PTRUSTEEA pTrustee, PSID pSid)
|
|||
pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
|
||||
pTrustee->TrusteeForm = TRUSTEE_IS_SID;
|
||||
pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||
pTrustee->ptstrName = (LPSTR) pSid;
|
||||
pTrustee->ptstrName = pSid;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -3186,7 +3186,7 @@ VOID WINAPI BuildTrusteeWithSidW(PTRUSTEEW pTrustee, PSID pSid)
|
|||
pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
|
||||
pTrustee->TrusteeForm = TRUSTEE_IS_SID;
|
||||
pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||
pTrustee->ptstrName = (LPWSTR) pSid;
|
||||
pTrustee->ptstrName = pSid;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -3955,7 +3955,7 @@ static BOOL ParseStringAclToAcl(LPCWSTR StringAcl, LPDWORD lpdwFlags,
|
|||
StringAcl++;
|
||||
|
||||
/* Parse ACE account sid */
|
||||
if (ParseStringSidToSid(StringAcl, pAce ? (PSID)&pAce->SidStart : NULL, &sidlen))
|
||||
if (ParseStringSidToSid(StringAcl, pAce ? &pAce->SidStart : NULL, &sidlen))
|
||||
{
|
||||
while (*StringAcl && *StringAcl != ')')
|
||||
StringAcl++;
|
||||
|
@ -4051,7 +4051,7 @@ static BOOL ParseStringSecurityDescriptorToSecurityDescriptor(
|
|||
{
|
||||
DWORD bytes;
|
||||
|
||||
if (!ParseStringSidToSid(tok, (PSID)lpNext, &bytes))
|
||||
if (!ParseStringSidToSid(tok, lpNext, &bytes))
|
||||
goto lend;
|
||||
|
||||
if (SecurityDescriptor)
|
||||
|
@ -4069,7 +4069,7 @@ static BOOL ParseStringSecurityDescriptorToSecurityDescriptor(
|
|||
{
|
||||
DWORD bytes;
|
||||
|
||||
if (!ParseStringSidToSid(tok, (PSID)lpNext, &bytes))
|
||||
if (!ParseStringSidToSid(tok, lpNext, &bytes))
|
||||
goto lend;
|
||||
|
||||
if (SecurityDescriptor)
|
||||
|
@ -4203,8 +4203,7 @@ BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorW(
|
|||
NULL, &cBytes))
|
||||
goto lend;
|
||||
|
||||
psd = *SecurityDescriptor = (SECURITY_DESCRIPTOR*) LocalAlloc(
|
||||
GMEM_ZEROINIT, cBytes);
|
||||
psd = *SecurityDescriptor = LocalAlloc(GMEM_ZEROINIT, cBytes);
|
||||
if (!psd) goto lend;
|
||||
|
||||
psd->Revision = SID_REVISION;
|
||||
|
@ -4383,7 +4382,7 @@ static BOOL DumpAce(LPVOID pace, WCHAR **pwptr, ULONG *plen)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
piace = (ACCESS_ALLOWED_ACE *)pace;
|
||||
piace = pace;
|
||||
DumpString(&openbr, 1, pwptr, plen);
|
||||
switch (piace->Header.AceType)
|
||||
{
|
||||
|
@ -4423,7 +4422,7 @@ static BOOL DumpAce(LPVOID pace, WCHAR **pwptr, ULONG *plen)
|
|||
DumpString(&semicolon, 1, pwptr, plen);
|
||||
/* objects not supported */
|
||||
DumpString(&semicolon, 1, pwptr, plen);
|
||||
if (!DumpSid((PSID)&piace->SidStart, pwptr, plen))
|
||||
if (!DumpSid(&piace->SidStart, pwptr, plen))
|
||||
return FALSE;
|
||||
DumpString(&closebr, 1, pwptr, plen);
|
||||
return TRUE;
|
||||
|
@ -5074,7 +5073,7 @@ DWORD WINAPI GetNamedSecurityInfoW( LPWSTR name, SE_OBJECT_TYPE type,
|
|||
return ERROR_INVALID_SECURITY_DESCR;
|
||||
}
|
||||
|
||||
relative = (SECURITY_DESCRIPTOR_RELATIVE *)*descriptor;
|
||||
relative = *descriptor;
|
||||
relative->Control |= SE_SELF_RELATIVE;
|
||||
buffer = (BYTE *)relative;
|
||||
offset = sizeof(SECURITY_DESCRIPTOR_RELATIVE);
|
||||
|
|
|
@ -1809,7 +1809,7 @@ BOOL WINAPI ChangeServiceConfig2A( SC_HANDLE hService, DWORD dwInfoLevel,
|
|||
|
||||
if (dwInfoLevel == SERVICE_CONFIG_DESCRIPTION)
|
||||
{
|
||||
LPSERVICE_DESCRIPTIONA sd = (LPSERVICE_DESCRIPTIONA) lpInfo;
|
||||
LPSERVICE_DESCRIPTIONA sd = lpInfo;
|
||||
SERVICE_DESCRIPTIONW sdw;
|
||||
|
||||
sdw.lpDescription = SERV_dup( sd->lpDescription );
|
||||
|
@ -1820,7 +1820,7 @@ BOOL WINAPI ChangeServiceConfig2A( SC_HANDLE hService, DWORD dwInfoLevel,
|
|||
}
|
||||
else if (dwInfoLevel == SERVICE_CONFIG_FAILURE_ACTIONS)
|
||||
{
|
||||
LPSERVICE_FAILURE_ACTIONSA fa = (LPSERVICE_FAILURE_ACTIONSA) lpInfo;
|
||||
LPSERVICE_FAILURE_ACTIONSA fa = lpInfo;
|
||||
SERVICE_FAILURE_ACTIONSW faw;
|
||||
|
||||
faw.dwResetPeriod = fa->dwResetPeriod;
|
||||
|
|
Loading…
Reference in New Issue