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

Alexandre Julliard julliard at winehq.org
Mon Mar 24 07:54:39 CDT 2008


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

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Sat Mar 22 17:10:10 2008 +0000

wintab32: Assign to structs instead of using memcpy.

---

 dlls/wintab32/context.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/wintab32/context.c b/dlls/wintab32/context.c
index 9c4c262..3147ec0 100644
--- a/dlls/wintab32/context.c
+++ b/dlls/wintab32/context.c
@@ -214,8 +214,7 @@ LPOPENCONTEXT AddPacketToContextQueue(LPWTPACKET packet, HWND hwnd)
             else
             {
                 TRACE("Placed in queue %p index %i\n",ptr->handle,tgt);
-                memcpy(&ptr->PacketQueue[tgt], packet, sizeof
-                        (WTPACKET));
+                ptr->PacketQueue[tgt] = *packet;
                 ptr->PacketsQueued++;
 
                 if (ptr->ActiveCursor != packet->pkCursor)
@@ -440,7 +439,7 @@ HCTX WINAPI WTOpenW(HWND hWnd, LPLOGCONTEXTW lpLogCtx, BOOL fEnable)
     DUMPCONTEXT(*lpLogCtx);
 
     newcontext = HeapAlloc(GetProcessHeap(), 0 , sizeof(OPENCONTEXT));
-    memcpy(&(newcontext->context),lpLogCtx,sizeof(LOGCONTEXTW));
+    newcontext->context = *lpLogCtx;
     newcontext->hwndOwner = hWnd;
     newcontext->enabled = fEnable;
     newcontext->ActiveCursor = -1;




More information about the wine-cvs mailing list