ntdll: Assign to structs instead of using memcpy.
This commit is contained in:
parent
40c7031d24
commit
5ecd33e2f9
|
@ -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, ®_tzi))
|
||||
{
|
||||
memcpy(tzi, ®_tzi, sizeof(*tzi));
|
||||
*tzi = reg_tzi;
|
||||
NtClose(hkey);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue