Commit 51c9db55 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

ntdll: Remove unnecessary page variable.

get_page_vprot() doesn't require the base address. Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a98dd5a6
......@@ -2624,9 +2624,7 @@ SIZE_T virtual_uninterrupted_read_memory( const void *addr, void *buffer, SIZE_T
{
if (!(view->protect & VPROT_SYSTEM))
{
char *page = ROUND_ADDR( addr, page_mask );
while (bytes_read < size && (VIRTUAL_GetUnixProt( get_page_vprot( page )) & PROT_READ))
while (bytes_read < size && (VIRTUAL_GetUnixProt( get_page_vprot( addr )) & PROT_READ))
{
SIZE_T block_size = min( size - bytes_read, page_size - ((UINT_PTR)addr & page_mask) );
memcpy( buffer, addr, block_size );
......@@ -2634,7 +2632,6 @@ SIZE_T virtual_uninterrupted_read_memory( const void *addr, void *buffer, SIZE_T
addr = (const void *)((const char *)addr + block_size);
buffer = (void *)((char *)buffer + block_size);
bytes_read += block_size;
page += page_size;
}
}
}
......
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