mapi32: Remove unneeded casts.

This commit is contained in:
Andrew Talbot 2007-12-20 12:17:37 +00:00 committed by Alexandre Julliard
parent ca6003b8f0
commit d05a511d0b
2 changed files with 7 additions and 7 deletions

View File

@ -127,9 +127,9 @@ static LPVOID WINAPI IMAPIMalloc_fnRealloc(LPMALLOC iface, LPVOID pv, DWORD cb)
return LocalAlloc(LMEM_FIXED, cb); return LocalAlloc(LMEM_FIXED, cb);
if (cb) if (cb)
return LocalReAlloc((HANDLE) pv, cb, LMEM_MOVEABLE); return LocalReAlloc(pv, cb, LMEM_MOVEABLE);
LocalFree((HANDLE) pv); LocalFree(pv);
return NULL; return NULL;
} }
@ -139,7 +139,7 @@ static LPVOID WINAPI IMAPIMalloc_fnRealloc(LPMALLOC iface, LPVOID pv, DWORD cb)
static void WINAPI IMAPIMalloc_fnFree(LPMALLOC iface, LPVOID pv) static void WINAPI IMAPIMalloc_fnFree(LPMALLOC iface, LPVOID pv)
{ {
TRACE("(%p)->(%p)\n", iface, pv); TRACE("(%p)->(%p)\n", iface, pv);
LocalFree((HANDLE) pv); LocalFree(pv);
} }
/************************************************************************** /**************************************************************************
@ -148,7 +148,7 @@ static void WINAPI IMAPIMalloc_fnFree(LPMALLOC iface, LPVOID pv)
static DWORD WINAPI IMAPIMalloc_fnGetSize(LPMALLOC iface, LPVOID pv) static DWORD WINAPI IMAPIMalloc_fnGetSize(LPMALLOC iface, LPVOID pv)
{ {
TRACE("(%p)->(%p)\n", iface, pv); TRACE("(%p)->(%p)\n", iface, pv);
return LocalSize((HANDLE) pv); return LocalSize(pv);
} }
/************************************************************************** /**************************************************************************

View File

@ -928,7 +928,7 @@ SCODE WINAPI ScRelocProps(int cValues, LPSPropValue lpProps, LPVOID lpOld,
LPVOID lpNew, ULONG *lpCount) LPVOID lpNew, ULONG *lpCount)
{ {
static const BOOL bBadPtr = TRUE; /* Windows bug - Assumes source is bad */ static const BOOL bBadPtr = TRUE; /* Windows bug - Assumes source is bad */
LPSPropValue lpDest = (LPSPropValue)lpProps; LPSPropValue lpDest = lpProps;
ULONG ulCount = cValues * sizeof(SPropValue); ULONG ulCount = cValues * sizeof(SPropValue);
ULONG ulLen, i; ULONG ulLen, i;
int iter; int iter;
@ -964,7 +964,7 @@ SCODE WINAPI ScRelocProps(int cValues, LPSPropValue lpProps, LPVOID lpOld,
break; break;
case PT_STRING8: case PT_STRING8:
ulLen = bBadPtr ? 0 : lstrlenA(lpDest->Value.lpszA) + 1u; ulLen = bBadPtr ? 0 : lstrlenA(lpDest->Value.lpszA) + 1u;
lpDest->Value.lpszA = (LPSTR)RELOC_PTR(lpDest->Value.lpszA); lpDest->Value.lpszA = RELOC_PTR(lpDest->Value.lpszA);
if (bBadPtr) if (bBadPtr)
ulLen = lstrlenA(lpDest->Value.lpszA) + 1u; ulLen = lstrlenA(lpDest->Value.lpszA) + 1u;
ulCount += ulLen; ulCount += ulLen;
@ -999,7 +999,7 @@ SCODE WINAPI ScRelocProps(int cValues, LPSPropValue lpProps, LPVOID lpOld,
{ {
ULONG ulStrLen = bBadPtr ? 0 : lstrlenA(lpDest->Value.MVszA.lppszA[i]) + 1u; ULONG ulStrLen = bBadPtr ? 0 : lstrlenA(lpDest->Value.MVszA.lppszA[i]) + 1u;
lpDest->Value.MVszA.lppszA[i] = (LPSTR)RELOC_PTR(lpDest->Value.MVszA.lppszA[i]); lpDest->Value.MVszA.lppszA[i] = RELOC_PTR(lpDest->Value.MVszA.lppszA[i]);
if (bBadPtr) if (bBadPtr)
ulStrLen = lstrlenA(lpDest->Value.MVszA.lppszA[i]) + 1u; ulStrLen = lstrlenA(lpDest->Value.MVszA.lppszA[i]) + 1u;
ulCount += ulStrLen; ulCount += ulStrLen;