diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-18 11:12:46 -0800 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-18 11:14:59 -0800 |
commit | e55d03dd47c221f631fe518c623cdd8a703076b2 (patch) | |
tree | a8dad51972e4dd49b401afcc0f08ce4b53b331f1 /output/outrdf2.c | |
parent | 8c17bb2fc4d61675b6775e78fbb37b48f19379d3 (diff) | |
download | nasm-e55d03dd47c221f631fe518c623cdd8a703076b2.tar.gz |
Clean up the handling of various passes
The use of pass0, pass1, pass2, and "pass" passed as an argument is
really confusing and already caused a severe bug in the 2.14.01
release cycle. Clean them up and be far more explicit about what
various passes mean.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'output/outrdf2.c')
-rw-r--r-- | output/outrdf2.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/output/outrdf2.c b/output/outrdf2.c index 456d1bdf..c649a5a6 100644 --- a/output/outrdf2.c +++ b/output/outrdf2.c @@ -151,7 +151,7 @@ static void rdf2_init(void) headerlength = 0; } -static int32_t rdf2_section_names(char *name, int pass, int *bits) +static int32_t rdf2_section_names(char *name, int *bits) { int i; bool err; @@ -159,8 +159,6 @@ static int32_t rdf2_section_names(char *name, int pass, int *bits) int code = -1; int reserved = 0; - (void)pass; - /* * Default is 32 bits, in the text segment. */ @@ -705,7 +703,7 @@ static void rdf2_cleanup(void) * Handle RDOFF2 specific directives */ static enum directive_result -rdf2_directive(enum directive directive, char *value, int pass) +rdf2_directive(enum directive directive, char *value) { size_t n; @@ -716,7 +714,7 @@ rdf2_directive(enum directive directive, char *value, int pass) nasm_error(ERR_NONFATAL, "name size exceeds %d bytes", MODLIB_NAME_MAX); return DIRR_ERROR; } - if (pass == 1) { + if (pass_first()) { /* XXX */ struct DLLRec r; r.type = RDFREC_DLL; r.reclen = n + 1; @@ -730,7 +728,7 @@ rdf2_directive(enum directive directive, char *value, int pass) nasm_error(ERR_NONFATAL, "name size exceeds %d bytes", MODLIB_NAME_MAX); return DIRR_ERROR; } - if (pass == 1) { + if (pass_first()) { /* XXX */ struct ModRec r; r.type = RDFREC_MODNAME; r.reclen = n + 1; |