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

Alexandre Julliard julliard at winehq.org
Thu Mar 6 11:08:35 CST 2008


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

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Wed Mar  5 21:35:16 2008 +0000

mshtml: Assign to structs instead of using memcpy.

---

 dlls/mshtml/conpoint.c |    2 +-
 dlls/mshtml/oleobj.c   |    6 +++---
 dlls/mshtml/persist.c  |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/mshtml/conpoint.c b/dlls/mshtml/conpoint.c
index cad4877..85cf8dc 100644
--- a/dlls/mshtml/conpoint.c
+++ b/dlls/mshtml/conpoint.c
@@ -110,7 +110,7 @@ static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *i
     if(!pIID)
         return E_POINTER;
 
-    memcpy(pIID, This->iid, sizeof(IID));
+    *pIID = *This->iid;
     return S_OK;
 }
 
diff --git a/dlls/mshtml/oleobj.c b/dlls/mshtml/oleobj.c
index 116cbde..5e7181c 100644
--- a/dlls/mshtml/oleobj.c
+++ b/dlls/mshtml/oleobj.c
@@ -103,7 +103,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
             TRACE("hostinfo = {%u %08x %08x %s %s}\n",
                     hostinfo.cbSize, hostinfo.dwFlags, hostinfo.dwDoubleClick,
                     debugstr_w(hostinfo.pchHostCss), debugstr_w(hostinfo.pchHostNS));
-            memcpy(&This->hostinfo, &hostinfo, sizeof(DOCHOSTUIINFO));
+            This->hostinfo = hostinfo;
         }
 
         if(!This->has_key_path) {
@@ -285,7 +285,7 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms
         if(SUCCEEDED(hres)) {
             if(lprcPosRect) {
                 RECT rect; /* We need to pass rect as not const pointer */
-                memcpy(&rect, lprcPosRect, sizeof(RECT));
+                rect = *lprcPosRect;
                 IOleDocumentView_SetRect(DOCVIEW(This), &rect);
             }
             IOleDocumentView_Show(DOCVIEW(This), TRUE);
@@ -325,7 +325,7 @@ static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID *pClsid)
     if(!pClsid)
         return E_INVALIDARG;
 
-    memcpy(pClsid, &CLSID_HTMLDocument, sizeof(GUID));
+    *pClsid = CLSID_HTMLDocument;
     return S_OK;
 }
 
diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c
index a1d50b4..8a629d7 100644
--- a/dlls/mshtml/persist.c
+++ b/dlls/mshtml/persist.c
@@ -577,7 +577,7 @@ static HRESULT WINAPI PersistFile_GetClassID(IPersistFile *iface, CLSID *pClassI
     if(!pClassID)
         return E_INVALIDARG;
 
-    memcpy(pClassID, &CLSID_HTMLDocument, sizeof(CLSID));
+    *pClassID = CLSID_HTMLDocument;
     return S_OK;
 }
 




More information about the wine-cvs mailing list