Andrew Talbot : advapi32: Remove unneeded casts.
Alexandre Julliard
julliard at winehq.org
Mon Dec 3 09:17:46 CST 2007
Module: wine
Branch: master
Commit: 263cb72e13795820458575b9e27c2a026d37ec42
URL: http://source.winehq.org/git/wine.git/?a=commit;h=263cb72e13795820458575b9e27c2a026d37ec42
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Sat Dec 1 16:14:25 2007 +0000
advapi32: Remove unneeded casts.
---
dlls/advapi32/cred.c | 8 ++++----
dlls/advapi32/crypt.c | 2 +-
dlls/advapi32/security.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
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-cvs
mailing list