wininet: Assign to structs instead of using memcpy

Andrew Talbot andrew.talbot at talbotville.com
Sat Mar 22 12:10:04 CDT 2008


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

diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index be1ee16..a8ae808 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -2979,7 +2979,7 @@ static DWORD CALLBACK INTERNET_WorkerThreadFunc(LPVOID lpvParam)
 
     TRACE("\n");
 
-    memcpy(&workRequest, lpRequest, sizeof(WORKREQUEST));
+    workRequest = *lpRequest;
     HeapFree(GetProcessHeap(), 0, lpRequest);
 
     workRequest.asyncproc(&workRequest);
@@ -3008,7 +3008,7 @@ BOOL INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest)
     if (!lpNewRequest)
         return FALSE;
 
-    memcpy(lpNewRequest, lpWorkRequest, sizeof(WORKREQUEST));
+    *lpNewRequest = *lpWorkRequest;
 
     bSuccess = QueueUserWorkItem(INTERNET_WorkerThreadFunc, lpNewRequest, WT_EXECUTELONGFUNCTION);
     if (!bSuccess)



More information about the wine-patches mailing list