summaryrefslogtreecommitdiff
path: root/output/outas86.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2014-10-21 12:50:47 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2014-10-21 12:50:47 -0700
commite76a6260556d76b756ef56cdd4ca5b41e61259bc (patch)
treed39495eb0516eccd9c3e89efbf4406d2e4ce4a08 /output/outas86.c
parent505de5dc57788afb50f5c6bb65e39fd45f954e05 (diff)
downloadnasm-e76a6260556d76b756ef56cdd4ca5b41e61259bc.tar.gz
Replace unchecked fwrite() calls
Instead of having unchecked fwrite() calls, introduce nasm_write() which does error checking (and fatal errors if the write fails). Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'output/outas86.c')
-rw-r--r--output/outas86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/output/outas86.c b/output/outas86.c
index 7af8d785..95675ef8 100644
--- a/output/outas86.c
+++ b/output/outas86.c
@@ -545,7 +545,7 @@ static void as86_write_section(struct Section *sect, int index)
int32_t tmplen = (length > 64 ? 64 : length);
fputc(0x40 | (tmplen & 0x3F), ofile);
saa_rnbytes(sect->data, buf, tmplen);
- fwrite(buf, 1, tmplen, ofile);
+ nasm_write(buf, tmplen, ofile);
length -= tmplen;
} while (length > 0);
break;