summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2010-04-01 01:17:00 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2010-04-01 01:17:00 +0400
commitcdcd1f7ac4ac9b60f8a6dd7327435997e478ebdd (patch)
tree6776bef6b474b0a4e0e73f6b3bfdc61ed8d4f61a /lib
parent5d269789a54d43e4d210438fd32b01fa743100e0 (diff)
downloadnasm-cdcd1f7ac4ac9b60f8a6dd7327435997e478ebdd.tar.gz
nasm-cdcd1f7ac4ac9b60f8a6dd7327435997e478ebdd.tar.bz2
nasm-cdcd1f7ac4ac9b60f8a6dd7327435997e478ebdd.zip
BR2979629: vsnprintf: Use nasm_malloc
There is no nasm_malloc_error helper anymore. Use nasm_error instead. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/vsnprintf.c12
1 files 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)