summaryrefslogtreecommitdiff
path: root/rdoff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-02-09 11:03:33 +0100
committerH. Peter Anvin <hpa@zytor.com>2009-02-21 17:24:08 -0800
commit999868f06f49ec6450872f224a7cc0a43214b063 (patch)
tree30f34b5c0133c948654ebcb386f0b53127d4309d /rdoff
parent04616f4e85d7c5c8501432f7124cf15f440aeae1 (diff)
downloadnasm-999868f06f49ec6450872f224a7cc0a43214b063.tar.gz
Unify all-zero buffers; add fwritezero()
We have a number of all-zero buffers in the code. Put a single all-zero buffer in nasmlib.c. Additionally, add fwritezero() which can be used to write an arbitrary number of all-zero bytes; this prevents the situation where the all-zero buffer is simply too small.
Diffstat (limited to 'rdoff')
-rw-r--r--rdoff/ldrdf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rdoff/ldrdf.c b/rdoff/ldrdf.c
index 046139b3..d137f163 100644
--- a/rdoff/ldrdf.c
+++ b/rdoff/ldrdf.c
@@ -37,6 +37,7 @@
#include "collectn.h"
#include "rdlib.h"
#include "segtab.h"
+#include "nasmlib.h"
#define LDRDF_VERSION "1.07"
@@ -1119,7 +1120,7 @@ void write_output(const char *filename)
fwrite(outputseg[i].data, outputseg[i].length, 1, f);
}
- fwrite("\0\0\0\0\0\0\0\0\0\0", 10, 1, f);
+ fwritezero(10, f);
}
/* =========================================================================