advapi32: Remove unneeded casts
Andrew Talbot
andrew.talbot at talbotville.com
Sat Dec 1 10:14:25 CST 2007
Changelog:
advapi32: Remove unneeded casts.
diff --git a/dlls/advapi32/cred.c b/dlls/advapi32/cred.c
index b5c99f6..e81a171 100644
--- a/dlls/advapi32/cred.c
+++ b/dlls/advapi32/cred.c
@@ -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;
diff --git a/dlls/advapi32/crypt.c b/dlls/advapi32/crypt.c
index c6ea940..601d095 100644
--- a/dlls/advapi32/crypt.c
+++ b/dlls/advapi32/crypt.c
@@ -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)
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index 9b32fdd..89498c2 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -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)
More information about the wine-patches
mailing list