Andrew Talbot : secur32: Assign to structs instead of using memcpy.
Alexandre Julliard
julliard at winehq.org
Mon Mar 17 10:46:27 CDT 2008
Module: wine
Branch: master
Commit: 599f58cc7c96cc42efd99176e218184601073777
URL: http://source.winehq.org/git/wine.git/?a=commit;h=599f58cc7c96cc42efd99176e218184601073777
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Sat Mar 15 23:25:42 2008 +0000
secur32: Assign to structs instead of using memcpy.
---
dlls/secur32/secur32.c | 2 +-
dlls/secur32/wrapper.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c
index 01e0480..5eb4bcd 100644
--- a/dlls/secur32/secur32.c
+++ b/dlls/secur32/secur32.c
@@ -745,7 +745,7 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesW(PULONG pcPackages,
{
PSecPkgInfoW pkgInfo = *ppPackageInfo + i++;
- memcpy(pkgInfo, &package->infoW, sizeof(SecPkgInfoW));
+ *pkgInfo = package->infoW;
if (package->infoW.Name)
{
TRACE("Name[%d] = %s\n", i - 1, debugstr_w(package->infoW.Name));
diff --git a/dlls/secur32/wrapper.c b/dlls/secur32/wrapper.c
index d51165a..2ab241d 100644
--- a/dlls/secur32/wrapper.c
+++ b/dlls/secur32/wrapper.c
@@ -45,7 +45,7 @@ static SECURITY_STATUS SECUR32_makeSecHandle(PSecHandle phSec,
if (newSec)
{
- memcpy(newSec, realHandle, sizeof(*realHandle));
+ *newSec = *realHandle;
phSec->dwUpper = (ULONG_PTR)package;
phSec->dwLower = (ULONG_PTR)newSec;
ret = SEC_E_OK;
@@ -778,7 +778,7 @@ SECURITY_STATUS WINAPI QuerySecurityPackageInfoW(SEC_WCHAR *pszPackageName,
PWSTR nextString = (PWSTR)((PBYTE)*ppPackageInfo +
sizeof(SecPkgInfoW));
- memcpy(*ppPackageInfo, &package->infoW, sizeof(package->infoW));
+ **ppPackageInfo = package->infoW;
if (package->infoW.Name)
{
(*ppPackageInfo)->Name = nextString;
More information about the wine-cvs
mailing list