diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2014-10-21 12:50:47 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-10-21 12:50:47 -0700 |
commit | e76a6260556d76b756ef56cdd4ca5b41e61259bc (patch) | |
tree | d39495eb0516eccd9c3e89efbf4406d2e4ce4a08 /output/outas86.c | |
parent | 505de5dc57788afb50f5c6bb65e39fd45f954e05 (diff) | |
download | nasm-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.c | 2 |
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; |