diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-04-01 01:17:00 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-04-01 01:17:00 +0400 |
commit | cdcd1f7ac4ac9b60f8a6dd7327435997e478ebdd (patch) | |
tree | 6776bef6b474b0a4e0e73f6b3bfdc61ed8d4f61a /lib | |
parent | 5d269789a54d43e4d210438fd32b01fa743100e0 (diff) | |
download | nasm-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.c | 12 |
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) |