Michael Stefaniuc : mscms: Use assignment instead of memcpy to copy structs .

Alexandre Julliard julliard at winehq.org
Thu Jan 24 12:59:50 CST 2013


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

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Thu Jan 24 15:18:09 2013 +0100

mscms: Use assignment instead of memcpy to copy structs.

---

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

diff --git a/dlls/mscms/handle.c b/dlls/mscms/handle.c
index 1fec810..2f9eaec 100644
--- a/dlls/mscms/handle.c
+++ b/dlls/mscms/handle.c
@@ -140,7 +140,7 @@ HPROFILE create_profile( struct profile *profile )
     if ((handle = alloc_profile_handle()))
     {
         DWORD_PTR index = (DWORD_PTR)handle - 1;
-        memcpy( &profiletable[index], profile, sizeof(struct profile) );
+        profiletable[index] = *profile;
     }
     LeaveCriticalSection( &MSCMS_handle_cs );
     return handle;
@@ -221,7 +221,7 @@ HTRANSFORM create_transform( struct transform *transform )
     if ((handle = alloc_transform_handle()))
     {
         DWORD_PTR index = (DWORD_PTR)handle - 1;
-        memcpy( &transformtable[index], transform, sizeof(struct transform) );
+        transformtable[index] = *transform;
     }
     LeaveCriticalSection( &MSCMS_handle_cs );
     return handle;




More information about the wine-cvs mailing list