From 7cec994cf03723a459008ffc18e88464888cb338 Mon Sep 17 00:00:00 2001 From: jb Date: Fri, 4 Aug 2006 21:45:08 +0000 Subject: [PATCH] Fix for architectures where sizeof(void *) > sizeof(int). --- tools/regression/fsx/fsx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/regression/fsx/fsx.c b/tools/regression/fsx/fsx.c index b57efe670c1e..316185d48116 100644 --- a/tools/regression/fsx/fsx.c +++ b/tools/regression/fsx/fsx.c @@ -475,7 +475,7 @@ doread(unsigned offset, unsigned size) void check_eofpage(char *s, unsigned offset, char *p, int size) { - unsigned last_page, should_be_zero; + uintptr_t last_page, should_be_zero; if (offset + size <= (file_size & ~page_mask)) return; @@ -485,7 +485,7 @@ check_eofpage(char *s, unsigned offset, char *p, int size) * beyond the true end of the file mapping * (as required by mmap def in 1996 posix 1003.1) */ - last_page = ((int)p + (offset & page_mask) + size) & ~page_mask; + last_page = ((uintptr_t)p + (offset & page_mask) + size) & ~page_mask; for (should_be_zero = last_page + (file_size & page_mask); should_be_zero < last_page + page_size;