ole32: Assign to structs instead of using memcpy

Andrew Talbot andrew.talbot at talbotville.com
Thu Mar 13 15:52:00 CDT 2008


Changelog:
    ole32: Assign to structs instead of using memcpy.

diff --git a/dlls/ole32/enumx.c b/dlls/ole32/enumx.c
index 9610dbe..ea85092 100644
--- a/dlls/ole32/enumx.c
+++ b/dlls/ole32/enumx.c
@@ -177,7 +177,7 @@ enumx_impl *enumx_allocate(REFIID riid, const void *vtbl, ULONG elem_size)
         enumx->ref = 1;
         enumx->current = NULL;
         enumx->elem_size = elem_size;
-        memcpy(&enumx->riid, riid, sizeof *riid);
+        enumx->riid = *riid;
         list_init(&enumx->elements);
     }
 
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index 20d9ec3..d016d4e 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -887,7 +887,7 @@ static HRESULT WINAPI IPropertyStorage_fnSetClass(
         return E_INVALIDARG;
     if (!(This->grfMode & STGM_READWRITE))
         return STG_E_ACCESSDENIED;
-    memcpy(&This->clsid, clsid, sizeof(This->clsid));
+    This->clsid = *clsid;
     This->dirty = TRUE;
     if (This->grfFlags & PROPSETFLAG_UNBUFFERED)
         IPropertyStorage_Commit(iface, STGC_DEFAULT);



More information about the wine-patches mailing list