Commit 2d27d829 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

comdlg32: Remove superfluous casts of void pointers to other pointer types.

parent 5f55f154
...@@ -417,7 +417,7 @@ static HWND COMDLG32_FR_DoFindReplace( ...@@ -417,7 +417,7 @@ static HWND COMDLG32_FR_DoFindReplace(
goto cleanup; goto cleanup;
} }
if((rcs = (LPDLGTEMPLATEW)LockResource(loadrc)) == NULL) if((rcs = LockResource(loadrc)) == NULL)
{ {
error = CDERR_LOCKRESFAILURE; error = CDERR_LOCKRESFAILURE;
goto cleanup; goto cleanup;
...@@ -453,7 +453,7 @@ HWND WINAPI FindTextA( ...@@ -453,7 +453,7 @@ HWND WINAPI FindTextA(
if(!COMDLG32_FR_CheckPartial(pfr, FALSE)) if(!COMDLG32_FR_CheckPartial(pfr, FALSE))
return 0; 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 */ return 0; /* Error has been set */
pdata->user_fr.fra = pfr; pdata->user_fr.fra = pfr;
...@@ -476,7 +476,7 @@ HWND WINAPI ReplaceTextA( ...@@ -476,7 +476,7 @@ HWND WINAPI ReplaceTextA(
if(!COMDLG32_FR_CheckPartial(pfr, TRUE)) if(!COMDLG32_FR_CheckPartial(pfr, TRUE))
return 0; 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 */ return 0; /* Error has been set */
pdata->user_fr.fra = pfr; pdata->user_fr.fra = pfr;
...@@ -507,8 +507,8 @@ HWND WINAPI FindTextW( ...@@ -507,8 +507,8 @@ HWND WINAPI FindTextW(
len = WideCharToMultiByte( CP_ACP, 0, pfr->lpstrFindWhat, pfr->wFindWhatLen, len = WideCharToMultiByte( CP_ACP, 0, pfr->lpstrFindWhat, pfr->wFindWhatLen,
NULL, 0, NULL, NULL ); NULL, 0, NULL, NULL );
if((pdata = (COMDLG32_FR_Data *)COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data) + len)) == NULL) if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data) + len)) == NULL)
return 0; /* Error has been set */ return 0; /* Error has been set */
pdata->user_fr.frw = pfr; pdata->user_fr.frw = pfr;
pdata->fr = *(LPFINDREPLACEA)pfr; /* FINDREPLACEx have same size */ pdata->fr = *(LPFINDREPLACEA)pfr; /* FINDREPLACEx have same size */
...@@ -543,9 +543,8 @@ HWND WINAPI ReplaceTextW( ...@@ -543,9 +543,8 @@ HWND WINAPI ReplaceTextW(
NULL, 0, NULL, NULL ); NULL, 0, NULL, NULL );
len2 = WideCharToMultiByte( CP_ACP, 0, pfr->lpstrReplaceWith, pfr->wReplaceWithLen, len2 = WideCharToMultiByte( CP_ACP, 0, pfr->lpstrReplaceWith, pfr->wReplaceWithLen,
NULL, 0, NULL, NULL ); NULL, 0, NULL, NULL );
if((pdata = (COMDLG32_FR_Data *)COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data) if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data) + len1 + len2)) == NULL)
+ len1 + len2)) == NULL) return 0; /* Error has been set */
return 0; /* Error has been set */
pdata->user_fr.frw = pfr; pdata->user_fr.frw = pfr;
pdata->fr = *(LPFINDREPLACEA)pfr; /* FINDREPLACEx have same size */ pdata->fr = *(LPFINDREPLACEA)pfr; /* FINDREPLACEx have same size */
......
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