ntdll: Assign to structs instead of using memcpy.

This commit is contained in:
Andrew Talbot 2008-03-08 15:37:05 +00:00 committed by Alexandre Julliard
parent 40c7031d24
commit 5ecd33e2f9
3 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}