Alexandre Julliard : server: Don't round up the header size for image mappings.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 11 14:34:32 CST 2006


Module: wine
Branch: refs/heads/master
Commit: b54e9e94e98624acde1bb00e10c2055dfed9c2d7
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=b54e9e94e98624acde1bb00e10c2055dfed9c2d7

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jan 11 20:59:26 2006 +0100

server: Don't round up the header size for image mappings.

---

 server/mapping.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/server/mapping.c b/server/mapping.c
index 6701e44..e636ae8 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -105,9 +105,6 @@ static void init_page_size(void)
 }
 #endif  /* __i386__ */
 
-#define ROUND_SIZE_MASK(addr,size,mask) \
-   (((int)(size) + ((int)(addr) & (mask)) + (mask)) & ~(mask))
-
 #define ROUND_SIZE(size)  (((size) + page_mask) & ~page_mask)
 
 
@@ -246,8 +243,7 @@ static int get_image_params( struct mapp
 
     mapping->size        = ROUND_SIZE( nt.OptionalHeader.SizeOfImage );
     mapping->base        = (void *)nt.OptionalHeader.ImageBase;
-    mapping->header_size = ROUND_SIZE_MASK( mapping->base, nt.OptionalHeader.SizeOfHeaders,
-                                            nt.OptionalHeader.SectionAlignment - 1 );
+    mapping->header_size = nt.OptionalHeader.SizeOfHeaders;
     mapping->protect     = VPROT_IMAGE;
 
     /* sanity check */




More information about the wine-cvs mailing list