Commit 5ecd33e2 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

ntdll: Assign to structs instead of using memcpy.

parent 40c7031d
......@@ -96,7 +96,7 @@ NTSTATUS WINAPI RtlpNtCreateKey( PHANDLE retkey, ACCESS_MASK access, const OBJEC
if (attr)
{
memcpy( &oa, attr, sizeof oa );
oa = *attr;
oa.Attributes &= ~(OBJ_PERMANENT|OBJ_EXCLUSIVE);
attr = &oa;
}
......
......@@ -158,7 +158,7 @@ NTSTATUS WINAPI RtlAllocateAndInitializeSid (
tmp_sid->Revision = SID_REVISION;
if (pIdentifierAuthority)
memcpy(&tmp_sid->IdentifierAuthority, pIdentifierAuthority, sizeof(SID_IDENTIFIER_AUTHORITY));
tmp_sid->IdentifierAuthority = *pIdentifierAuthority;
tmp_sid->SubAuthorityCount = nSubAuthorityCount;
switch( nSubAuthorityCount )
......@@ -302,7 +302,7 @@ BOOL WINAPI RtlInitializeSid(
pisid->Revision = SID_REVISION;
pisid->SubAuthorityCount = nSubAuthorityCount;
if (pIdentifierAuthority)
memcpy(&pisid->IdentifierAuthority, pIdentifierAuthority, sizeof (SID_IDENTIFIER_AUTHORITY));
pisid->IdentifierAuthority = *pIdentifierAuthority;
for (i = 0; i < nSubAuthorityCount; i++)
*RtlSubAuthoritySid(pSid, i) = 0;
......
......@@ -684,7 +684,7 @@ static void find_reg_tz_info(RTL_TIME_ZONE_INFORMATION *tzi)
if (match_tz_info(tzi, &reg_tzi))
{
memcpy(tzi, &reg_tzi, sizeof(*tzi));
*tzi = reg_tzi;
NtClose(hkey);
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment