Commit 263cb72e authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

advapi32: Remove unneeded casts.

parent b3e56e9d
......@@ -932,7 +932,7 @@ static void convert_PCREDENTIALW_to_PCREDENTIALA(const CREDENTIALW *CredentialW,
CredentialA->Type = CredentialW->Type;
if (CredentialW->TargetName)
{
CredentialA->TargetName = (LPSTR)buffer;
CredentialA->TargetName = buffer;
string_len = WideCharToMultiByte(CP_ACP, 0, CredentialW->TargetName, -1, CredentialA->TargetName, -1, NULL, NULL);
buffer += string_len;
*len += string_len;
......@@ -941,7 +941,7 @@ static void convert_PCREDENTIALW_to_PCREDENTIALA(const CREDENTIALW *CredentialW,
CredentialA->TargetName = NULL;
if (CredentialW->Comment)
{
CredentialA->Comment = (LPSTR)buffer;
CredentialA->Comment = buffer;
string_len = WideCharToMultiByte(CP_ACP, 0, CredentialW->Comment, -1, CredentialA->Comment, -1, NULL, NULL);
buffer += string_len;
*len += string_len;
......@@ -965,7 +965,7 @@ static void convert_PCREDENTIALW_to_PCREDENTIALA(const CREDENTIALW *CredentialW,
CredentialA->Attributes = NULL; /* FIXME */
if (CredentialW->TargetAlias)
{
CredentialA->TargetAlias = (LPSTR)buffer;
CredentialA->TargetAlias = buffer;
string_len = WideCharToMultiByte(CP_ACP, 0, CredentialW->TargetAlias, -1, CredentialA->TargetAlias, -1, NULL, NULL);
buffer += string_len;
*len += string_len;
......@@ -974,7 +974,7 @@ static void convert_PCREDENTIALW_to_PCREDENTIALA(const CREDENTIALW *CredentialW,
CredentialA->TargetAlias = NULL;
if (CredentialW->UserName)
{
CredentialA->UserName = (LPSTR)buffer;
CredentialA->UserName = buffer;
string_len = WideCharToMultiByte(CP_ACP, 0, CredentialW->UserName, -1, CredentialA->UserName, -1, NULL, NULL);
buffer += string_len;
*len += string_len;
......
......@@ -52,7 +52,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt);
static HWND crypt_hWindow;
#define CRYPT_Alloc(size) ((LPVOID)LocalAlloc(LMEM_ZEROINIT, size))
#define CRYPT_Alloc(size) (LocalAlloc(LMEM_ZEROINIT, size))
#define CRYPT_Free(buffer) (LocalFree((HLOCAL)buffer))
static inline PWSTR CRYPT_GetProvKeyName(PCWSTR pProvName)
......
......@@ -4087,7 +4087,7 @@ BOOL WINAPI ConvertStringSidToSidW(LPCWSTR StringSid, PSID* Sid)
SetLastError(ERROR_INVALID_PARAMETER);
else if (ParseStringSidToSid(StringSid, NULL, &cBytes))
{
PSID pSid = *Sid = (PSID) LocalAlloc(0, cBytes);
PSID pSid = *Sid = LocalAlloc(0, cBytes);
bret = ParseStringSidToSid(StringSid, pSid, &cBytes);
if (!bret)
......
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