Michael Stefaniuc : comdlg32: Remove superfluous casts of void pointers to other pointer types.
Alexandre Julliard
julliard at winehq.org
Thu Nov 6 08:26:00 CST 2008
Module: wine
Branch: master
Commit: 2d27d8290919501c08549a810277fb8760d25b68
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2d27d8290919501c08549a810277fb8760d25b68
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Wed Nov 5 23:01:03 2008 +0100
comdlg32: Remove superfluous casts of void pointers to other pointer types.
---
dlls/comdlg32/finddlg32.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/comdlg32/finddlg32.c b/dlls/comdlg32/finddlg32.c
index 027a8b4..80c8e8b 100644
--- a/dlls/comdlg32/finddlg32.c
+++ b/dlls/comdlg32/finddlg32.c
@@ -417,7 +417,7 @@ static HWND COMDLG32_FR_DoFindReplace(
goto cleanup;
}
- if((rcs = (LPDLGTEMPLATEW)LockResource(loadrc)) == NULL)
+ if((rcs = LockResource(loadrc)) == NULL)
{
error = CDERR_LOCKRESFAILURE;
goto cleanup;
@@ -453,7 +453,7 @@ HWND WINAPI FindTextA(
if(!COMDLG32_FR_CheckPartial(pfr, FALSE))
return 0;
- if((pdata = (COMDLG32_FR_Data *)COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data))) == NULL)
+ if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data))) == NULL)
return 0; /* Error has been set */
pdata->user_fr.fra = pfr;
@@ -476,7 +476,7 @@ HWND WINAPI ReplaceTextA(
if(!COMDLG32_FR_CheckPartial(pfr, TRUE))
return 0;
- if((pdata = (COMDLG32_FR_Data *)COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data))) == NULL)
+ if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data))) == NULL)
return 0; /* Error has been set */
pdata->user_fr.fra = pfr;
@@ -507,8 +507,8 @@ HWND WINAPI FindTextW(
len = WideCharToMultiByte( CP_ACP, 0, pfr->lpstrFindWhat, pfr->wFindWhatLen,
NULL, 0, NULL, NULL );
- if((pdata = (COMDLG32_FR_Data *)COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data) + len)) == NULL)
- return 0; /* Error has been set */
+ if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data) + len)) == NULL)
+ return 0; /* Error has been set */
pdata->user_fr.frw = pfr;
pdata->fr = *(LPFINDREPLACEA)pfr; /* FINDREPLACEx have same size */
@@ -543,9 +543,8 @@ HWND WINAPI ReplaceTextW(
NULL, 0, NULL, NULL );
len2 = WideCharToMultiByte( CP_ACP, 0, pfr->lpstrReplaceWith, pfr->wReplaceWithLen,
NULL, 0, NULL, NULL );
- if((pdata = (COMDLG32_FR_Data *)COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data)
- + len1 + len2)) == NULL)
- return 0; /* Error has been set */
+ if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data) + len1 + len2)) == NULL)
+ return 0; /* Error has been set */
pdata->user_fr.frw = pfr;
pdata->fr = *(LPFINDREPLACEA)pfr; /* FINDREPLACEx have same size */
More information about the wine-cvs
mailing list