Andrew Talbot : oledlg: Assign to structs instead of using memcpy.

Alexandre Julliard julliard at winehq.org
Fri Mar 14 08:29:22 CDT 2008


Module: wine
Branch: master
Commit: 1b2dc823d293fdb2f189c011711d5e99cfce1d94
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1b2dc823d293fdb2f189c011711d5e99cfce1d94

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Thu Mar 13 20:52:16 2008 +0000

oledlg: Assign to structs instead of using memcpy.

---

 dlls/oledlg/insobjdlg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/oledlg/insobjdlg.c b/dlls/oledlg/insobjdlg.c
index 4578bbe..e875048 100644
--- a/dlls/oledlg/insobjdlg.c
+++ b/dlls/oledlg/insobjdlg.c
@@ -377,7 +377,7 @@ static BOOL UIINSERTOBJECTDLG_PopulateObjectTypes(InsertObjectDlgInfo* pdlgInfo)
     if (ERROR_SUCCESS == RegQueryValueW(hkey, NULL, keydesc, &len))
     {
        CLSID* lpclsid = HeapAlloc(GetProcessHeap(), 0, sizeof(CLSID));
-       memcpy(lpclsid, &clsid, sizeof(CLSID));
+       *lpclsid = clsid;
 
        len = SendMessageW(pdlgInfo->hwndObjTypeLB, LB_ADDSTRING, 0, (LPARAM)keydesc);
        SendMessageW(pdlgInfo->hwndObjTypeLB, LB_SETITEMDATA, (WPARAM)len, (LPARAM)lpclsid);
@@ -453,7 +453,7 @@ static BOOL UIINSERTOBJECTDLG_OnOpen(InsertObjectDlgInfo* pdlgInfo)
     {
        CLSID* clsid = (CLSID*) SendMessageA(pdlgInfo->hwndObjTypeLB, 
           LB_GETITEMDATA, (WPARAM)index, 0);
-       memcpy(&pdlgInfo->lpOleUIInsertObject->clsid, clsid, sizeof(CLSID));
+       pdlgInfo->lpOleUIInsertObject->clsid = *clsid;
 
        if (pdlgInfo->lpOleUIInsertObject->dwFlags & IOF_CREATENEWOBJECT)
        {




More information about the wine-cvs mailing list