diff options
author | H. Peter Anvin <hpa@zytor.com> | 2017-01-22 20:50:23 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2017-01-22 20:53:03 -0800 |
commit | 6d20c1f89435930628d24349f5cb8617864e9890 (patch) | |
tree | 74b787a2c48fcb38f26807d41cc17b5cd187bb36 | |
parent | dc9c312c975e6959448bc3514630f0f2cf304179 (diff) | |
download | nasm-6d20c1f89435930628d24349f5cb8617864e9890.tar.gz |
output/outmacho.c: use UINT64_C() instead of 1L
Type long is not necessarily long enough to be valid to hold a 64-bit
number (e.g. 32-bit platforms or Win64), however, the output variable
newaddr is uint64_t.
Cc: Martin Lindhe <martin-commit@ubique.se>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | output/outmacho.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/output/outmacho.c b/output/outmacho.c index a6a16de6..1092d8c3 100644 --- a/output/outmacho.c +++ b/output/outmacho.c @@ -1109,7 +1109,7 @@ static void macho_calculate_sizes (void) if (s->align == -1) s->align = DEFAULT_SECTION_ALIGNMENT; - newaddr = ALIGN(s->addr, 1L << s->align); + newaddr = ALIGN(s->addr, UINT64_C(1) << s->align); s->addr = newaddr; seg_vmsize = newaddr + s->size; |