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

Alexandre Julliard julliard at winehq.org
Fri Mar 7 05:30:10 CST 2008


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

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Thu Mar  6 22:33:56 2008 +0000

msvfw32: Assign to structs instead of using memcpy.

---

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

diff --git a/dlls/msvfw32/msvideo_main.c b/dlls/msvfw32/msvideo_main.c
index aaf8d0c..baea47b 100644
--- a/dlls/msvfw32/msvideo_main.c
+++ b/dlls/msvfw32/msvideo_main.c
@@ -753,7 +753,7 @@ static BOOL enum_compressors(HWND list, COMPVARS *pcv, BOOL enum_all)
             idx = SendMessageW(list, CB_ADDSTRING, 0, (LPARAM)icinfo.szDescription);
 
             ic = HeapAlloc(GetProcessHeap(), 0, sizeof(struct codec_info));
-            memcpy(&ic->icinfo, &icinfo, sizeof(ICINFO));
+            ic->icinfo = icinfo;
             ic->hic = hic;
             SendMessageW(list, CB_SETITEMDATA, idx, (LPARAM)ic);
         }
@@ -1449,7 +1449,7 @@ BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn)
     if (!pc->lpbiIn)
         return FALSE;
 
-    memcpy(pc->lpbiIn, lpbiIn, sizeof(BITMAPINFO));
+    *pc->lpbiIn = *lpbiIn;
     pc->lpBitsPrev = HeapAlloc(GetProcessHeap(), 0, pc->lpbiIn->bmiHeader.biSizeImage);
     if (!pc->lpBitsPrev)
     {




More information about the wine-cvs mailing list