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

Alexandre Julliard julliard at winehq.org
Tue Feb 12 16:46:10 CST 2008


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

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Mon Feb 11 20:48:58 2008 +0000

cabinet: Assign to structs instead of using memcpy.

---

 dlls/cabinet/fci.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/cabinet/fci.c b/dlls/cabinet/fci.c
index a33f2e3..ea745a6 100644
--- a/dlls/cabinet/fci.c
+++ b/dlls/cabinet/fci.c
@@ -1331,7 +1331,7 @@ static BOOL fci_flush_folder(
       )
   ) {
     /* save CCAB */
-    memcpy(&(p_fci_internal->oldCCAB), p_fci_internal->pccab, sizeof(CCAB));
+    p_fci_internal->oldCCAB = *p_fci_internal->pccab;
     /* increment cabinet index */
     ++(p_fci_internal->pccab->iCab);
     /* get name of next cabinet */
@@ -2244,7 +2244,7 @@ static BOOL fci_flush_cabinet(
       CB_MAX_CABINET_NAME + CB_MAX_DISK_NAME
     )) {
       /* save CCAB */
-      memcpy(&(p_fci_internal->oldCCAB), p_fci_internal->pccab, sizeof(CCAB));
+      p_fci_internal->oldCCAB = *p_fci_internal->pccab;
       /* increment cabinet index */
       ++(p_fci_internal->pccab->iCab);
       /* get name of next cabinet */
@@ -2477,7 +2477,7 @@ BOOL __cdecl FCIAddFile(
       )
   ) {
     /* save CCAB */
-    memcpy(&(p_fci_internal->oldCCAB), p_fci_internal->pccab, sizeof(CCAB));
+    p_fci_internal->oldCCAB = *p_fci_internal->pccab;
     /* increment cabinet index */
     ++(p_fci_internal->pccab->iCab);
     /* get name of next cabinet */
@@ -2644,7 +2644,7 @@ BOOL __cdecl FCIAddFile(
       )
   ) {
     /* save CCAB */
-    memcpy(&(p_fci_internal->oldCCAB), p_fci_internal->pccab, sizeof(CCAB));
+    p_fci_internal->oldCCAB = *p_fci_internal->pccab;
     /* increment cabinet index */
     ++(p_fci_internal->pccab->iCab);
     /* get name of next cabinet */




More information about the wine-cvs mailing list