path: root/rdoff
diff options
authorH. Peter Anvin <hpa@zytor.com>2018-06-15 18:20:17 -0700
committerH. Peter Anvin <hpa@zytor.com>2018-06-15 18:20:17 -0700
commitc51369067ce7cfac43d8bc8681a3c916d8d5e503 (patch)
tree185bbd5df654b0e0c61c84aa2da144f18406e5f3 /rdoff
parentd3b1832c049c533656fd1945440d637f01a0f1a4 (diff)
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 'rdoff')
1 files changed, 1 insertions, 1 deletions
diff --git a/rdoff/rdflib.c b/rdoff/rdflib.c
index b85b383f..8dbff4af 100644
--- a/rdoff/rdflib.c
+++ b/rdoff/rdflib.c
@@ -374,7 +374,7 @@ int main(int argc, char **argv)
/* check against desired name */
if (!strcmp(buf, argv[3])) {
if (fread(p = rdbuf, 1, sizeof(rdbuf), fptmp) < 10) {
- nasm_fatal(0, "short read on input");
+ nasm_fatal("short read on input");
l = *(int32_t *)(p + 6);
fseek(fptmp, l, SEEK_CUR);