From 41087068aa3d5ddac8b28cb2bdcacd606f475c08 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 3 Mar 2016 14:27:34 -0800 Subject: 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 --- lib/vsnprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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) -- cgit v1.2.1