mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
fixed ProbeForWrite() for optimized builds
svn path=/trunk/; revision=13149
This commit is contained in:
parent
f9c455c59e
commit
e9bb005dfb
1 changed files with 3 additions and 5 deletions
|
@ -820,8 +820,7 @@ ProbeForWrite (IN CONST VOID *Address,
|
||||||
IN ULONG Length,
|
IN ULONG Length,
|
||||||
IN ULONG Alignment)
|
IN ULONG Alignment)
|
||||||
{
|
{
|
||||||
PULONG Ptr;
|
volatile PCHAR Ptr;
|
||||||
ULONG x;
|
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
||||||
ASSERT(Alignment ==1 || Alignment == 2 || Alignment == 4 || Alignment == 8);
|
ASSERT(Alignment ==1 || Alignment == 2 || Alignment == 4 || Alignment == 8);
|
||||||
|
@ -842,9 +841,8 @@ ProbeForWrite (IN CONST VOID *Address,
|
||||||
/* Check for accessible pages */
|
/* Check for accessible pages */
|
||||||
for (i = 0; i < Length; i += PAGE_SIZE)
|
for (i = 0; i < Length; i += PAGE_SIZE)
|
||||||
{
|
{
|
||||||
Ptr = (PULONG)(((ULONG_PTR)Address & ~(PAGE_SIZE - 1)) + i);
|
Ptr = (PCHAR)(((ULONG_PTR)Address & ~(PAGE_SIZE - 1)) + i);
|
||||||
x = *Ptr;
|
*Ptr = *Ptr;
|
||||||
*Ptr = x;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue