diff options
author | H. Peter Anvin <hpa@zytor.com> | 2018-06-15 18:20:17 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2018-06-15 18:20:17 -0700 |
commit | c51369067ce7cfac43d8bc8681a3c916d8d5e503 (patch) | |
tree | 185bbd5df654b0e0c61c84aa2da144f18406e5f3 /asm/directiv.c | |
parent | d3b1832c049c533656fd1945440d637f01a0f1a4 (diff) | |
download | nasm-c51369067ce7cfac43d8bc8681a3c916d8d5e503.tar.gz |
errors: simplify nasm_fatal() and nasm_panic()
Nearly all instances of nasm_fatal() and nasm_panic() take a flags
argument of zero. Simplify the code by making nasm_fatal and
nasm_panic default to no flags, and add an alternate version if flags
really are desired. This also means that every call site doesn't have
to initialize a zero argument.
Furthermore, ERR_NOFILE is now often not necessary, as the error code
will no longer cause a null reference if there is no current
file. Therefore, we can remove many instances of ERR_NOFILE which only
deprives the user of information.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'asm/directiv.c')
-rw-r--r-- | asm/directiv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/asm/directiv.c b/asm/directiv.c index 68a74a12..13ef5eb7 100644 --- a/asm/directiv.c +++ b/asm/directiv.c @@ -395,7 +395,7 @@ bool process_directives(char *directive) } else if (passn == 1) absolute.offset = 0x100; /* don't go near zero in case of / */ else - nasm_panic(0, "invalid ABSOLUTE address " + nasm_panic("invalid ABSOLUTE address " "in pass two"); in_absolute = true; location.segment = NO_SEG; |