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 /lib | |
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 'lib')
-rw-r--r-- | lib/vsnprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vsnprintf.c b/lib/vsnprintf.c index bc54f949..ecca3e66 100644 --- a/lib/vsnprintf.c +++ b/lib/vsnprintf.c @@ -23,7 +23,7 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap) int rv, bytes; if (size > BUFFER_SIZE) { - nasm_error(ERR_PANIC|ERR_NOFILE, + nasm_panic(ERR_NOFILE, "vsnprintf: size (%d) > BUFFER_SIZE (%d)", size, BUFFER_SIZE); size = BUFFER_SIZE; @@ -31,7 +31,7 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap) rv = vsprintf(snprintf_buffer, format, ap); if (rv >= BUFFER_SIZE) - nasm_error(ERR_PANIC|ERR_NOFILE, "vsnprintf buffer overflow"); + nasm_panic(ERR_NOFILE, "vsnprintf buffer overflow"); if (size > 0) { if ((size_t)rv < size-1) |