diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-02-21 17:27:51 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-02-21 17:27:51 -0800 |
commit | 577f57614a159e3c5ab10bf03d345846796de932 (patch) | |
tree | 8ce5f15f177b9b58a7f52a17118acca269b38876 /output/outelf64.c | |
parent | a5c2455f8aacfc50863c4d3dfd9782c9c3b392e8 (diff) | |
download | nasm-577f57614a159e3c5ab10bf03d345846796de932.tar.gz |
outelf32/64: remove align_str in favor of fwritezero()
Drop the use of yet another local all-zero buffer, align_str, in favor
of calling fwritezero().
Diffstat (limited to 'output/outelf64.c')
-rw-r--r-- | output/outelf64.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/output/outelf64.c b/output/outelf64.c index 9960a394..24d0b81c 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -215,8 +215,6 @@ extern struct ofmt of_elf64; #define TY_DEBUGSYMLIN 0x40 /* internal call to debug_out */ -static const char align_str[SEG_ALIGN] = ""; /* ANSI will pad this with 0s */ - static struct ELF_SECTDATA { void *data; int64_t len; @@ -1349,7 +1347,7 @@ static void elf_write(void) loclen, 0, 0, 1, 0); } - fwrite(align_str, align, 1, elffp); + fwritezero(align, elffp); /* * Now output the sections. @@ -1550,7 +1548,7 @@ static void elf_write_sections(void) saa_fpwrite(elf_sects[i].data, elffp); else fwrite(elf_sects[i].data, len, 1, elffp); - fwrite(align_str, align, 1, elffp); + fwritezero(align, elffp); } } |