From cdcd1f7ac4ac9b60f8a6dd7327435997e478ebdd Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 1 Apr 2010 01:17:00 +0400 Subject: [PATCH] BR2979629: vsnprintf: Use nasm_malloc There is no nasm_malloc_error helper anymore. Use nasm_error instead. Signed-off-by: Cyrill Gorcunov --- lib/vsnprintf.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/vsnprintf.c b/lib/vsnprintf.c index 16d449c..bc54f94 100644 --- a/lib/vsnprintf.c +++ b/lib/vsnprintf.c @@ -23,17 +23,15 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap) int rv, bytes; if (size > BUFFER_SIZE) { - nasm_malloc_error(ERR_PANIC|ERR_NOFILE, - "snprintf: size (%d) > BUFFER_SIZE (%d)", - size, BUFFER_SIZE); + nasm_error(ERR_PANIC|ERR_NOFILE, + "vsnprintf: size (%d) > BUFFER_SIZE (%d)", + size, BUFFER_SIZE); size = BUFFER_SIZE; } rv = vsprintf(snprintf_buffer, format, ap); - if (rv >= BUFFER_SIZE) { - nasm_malloc_error(ERR_PANIC|ERR_NOFILE, - "snprintf buffer overflow"); - } + if (rv >= BUFFER_SIZE) + nasm_error(ERR_PANIC|ERR_NOFILE, "vsnprintf buffer overflow"); if (size > 0) { if ((size_t)rv < size-1) -- 2.7.4