diff options
author | H. Peter Anvin <hpa@zytor.com> | 2016-03-03 14:27:34 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2016-03-03 15:22:02 -0800 |
commit | 41087068aa3d5ddac8b28cb2bdcacd606f475c08 (patch) | |
tree | 8462ec36489012084a0c6f8980f590be795f99e5 /nasmlib.c | |
parent | 7f087afc6633197416c036976858ef3565ed3cc8 (diff) | |
download | nasm-41087068aa3d5ddac8b28cb2bdcacd606f475c08.tar.gz |
Replace nasm_error(ERR_FATAL/ERR_PANIC) with nasm_fatal/nasm_panic
Replace all instances of ERR_FATAL or ERR_PANIC with nasm_fatal or
nasm_panic so the compiler knows that these functions cannot return,
*and* we trigger abort() if we were to ever violate that constraint.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'nasmlib.c')
-rw-r--r-- | nasmlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -163,7 +163,7 @@ char *nasm_strndup(const char *s, size_t len) no_return nasm_assert_failed(const char *file, int line, const char *msg) { - nasm_error(ERR_FATAL, "assertion %s failed at %s:%d", msg, file, line); + nasm_fatal(0, "assertion %s failed at %s:%d", msg, file, line); exit(1); } @@ -171,7 +171,7 @@ void nasm_write(const void *ptr, size_t size, FILE *f) { size_t n = fwrite(ptr, 1, size, f); if (n != size) - nasm_error(ERR_FATAL, "unable to write output: %s", strerror(errno)); + nasm_fatal(0, "unable to write output: %s", strerror(errno)); } #ifndef nasm_stricmp |