summaryrefslogtreecommitdiff
path: root/src/ralloc.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-10-01 13:37:37 +0200
committerEli Zaretskii <eliz@gnu.org>2012-10-01 13:37:37 +0200
commit2d7d1608381a4c14822e50ae42e2a6d748842cc3 (patch)
treeb22ef7adf83c2aaf47cd7c6439a6e735f6b58551 /src/ralloc.c
parent7692b36bc6557b20f966801e3db346d8a166d32e (diff)
downloademacs-2d7d1608381a4c14822e50ae42e2a6d748842cc3.tar.gz
Clean up the Windows x64 changes.
nt/preprep.c (RVA_TO_PTR): Use 'unsigned char *' instead of 'void *', for pointer arithmetics. (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET): Enclose all macro arguments in parentheses. src/unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET) (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses. (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *', as the previous version used 'void *'. src/ralloc.c (ROUNDUP): Fix last change. (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type 'size_t'. Fixes: debbugs:12544
Diffstat (limited to 'src/ralloc.c')
-rw-r--r--src/ralloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ralloc.c b/src/ralloc.c
index 9422215b54f..e4a8fe9c6da 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -92,11 +92,11 @@ static int extra_bytes;
by changing the definition of PAGE. */
#define PAGE (getpagesize ())
#define ROUNDUP(size) (((size_t) (size) + page_size - 1) \
- & ~((size_t)page_size - 1))
+ & ~((size_t)(page_size - 1)))
#define MEM_ALIGN sizeof (double)
#define MEM_ROUNDUP(addr) (((size_t)(addr) + MEM_ALIGN - 1) \
- & ~((size_t)MEM_ALIGN - 1))
+ & ~(MEM_ALIGN - 1))
/* The hook `malloc' uses for the function which gets more space
from the system. */