Huw Davies : ntdll: Remove unnecessary page variable.

Alexandre Julliard julliard at winehq.org
Tue May 26 17:17:07 CDT 2020


Module: wine
Branch: master
Commit: 51c9db55e6091985a4913bbd4512855d4bc08885
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=51c9db55e6091985a4913bbd4512855d4bc08885

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue May 26 10:57:24 2020 +0100

ntdll: Remove unnecessary page variable.

get_page_vprot() doesn't require the base address.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/virtual.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 005c3ee441..3468b6f5be 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -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;
             }
         }
     }




More information about the wine-cvs mailing list