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)
|
if (attr)
|
||||||
{
|
{
|
||||||
memcpy( &oa, attr, sizeof oa );
|
oa = *attr;
|
||||||
oa.Attributes &= ~(OBJ_PERMANENT|OBJ_EXCLUSIVE);
|
oa.Attributes &= ~(OBJ_PERMANENT|OBJ_EXCLUSIVE);
|
||||||
attr = &oa;
|
attr = &oa;
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ NTSTATUS WINAPI RtlAllocateAndInitializeSid (
|
|||||||
tmp_sid->Revision = SID_REVISION;
|
tmp_sid->Revision = SID_REVISION;
|
||||||
|
|
||||||
if (pIdentifierAuthority)
|
if (pIdentifierAuthority)
|
||||||
memcpy(&tmp_sid->IdentifierAuthority, pIdentifierAuthority, sizeof(SID_IDENTIFIER_AUTHORITY));
|
tmp_sid->IdentifierAuthority = *pIdentifierAuthority;
|
||||||
tmp_sid->SubAuthorityCount = nSubAuthorityCount;
|
tmp_sid->SubAuthorityCount = nSubAuthorityCount;
|
||||||
|
|
||||||
switch( nSubAuthorityCount )
|
switch( nSubAuthorityCount )
|
||||||
@ -302,7 +302,7 @@ BOOL WINAPI RtlInitializeSid(
|
|||||||
pisid->Revision = SID_REVISION;
|
pisid->Revision = SID_REVISION;
|
||||||
pisid->SubAuthorityCount = nSubAuthorityCount;
|
pisid->SubAuthorityCount = nSubAuthorityCount;
|
||||||
if (pIdentifierAuthority)
|
if (pIdentifierAuthority)
|
||||||
memcpy(&pisid->IdentifierAuthority, pIdentifierAuthority, sizeof (SID_IDENTIFIER_AUTHORITY));
|
pisid->IdentifierAuthority = *pIdentifierAuthority;
|
||||||
|
|
||||||
for (i = 0; i < nSubAuthorityCount; i++)
|
for (i = 0; i < nSubAuthorityCount; i++)
|
||||||
*RtlSubAuthoritySid(pSid, i) = 0;
|
*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))
|
if (match_tz_info(tzi, ®_tzi))
|
||||||
{
|
{
|
||||||
memcpy(tzi, ®_tzi, sizeof(*tzi));
|
*tzi = reg_tzi;
|
||||||
NtClose(hkey);
|
NtClose(hkey);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user