diff options
author | Alan Modra <amodra@gmail.com> | 2001-09-26 01:55:19 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-09-26 01:55:19 +0000 |
commit | 451dad9c5866e6317e68a7997007cb9ed27ea15a (patch) | |
tree | 4c186f49f8579457d4cc0c731f6fcbd4ffe75b05 /binutils/objdump.c | |
parent | 86caa542b14e8beb3da59924da1d37486cf166d1 (diff) | |
download | gdb-451dad9c5866e6317e68a7997007cb9ed27ea15a.zip gdb-451dad9c5866e6317e68a7997007cb9ed27ea15a.tar.gz gdb-451dad9c5866e6317e68a7997007cb9ed27ea15a.tar.bz2 |
* bucomm.c (fatal): Define using VPARAMS, VA_OPEN, VA_FIXEDARG,
VA_CLOSE.
(non_fatal): Likewise.
* objdump.c (objdump_sprintf): Likewise.
* readelf.c (error): Likewise.
(warn): Likewise.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r-- | binutils/objdump.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c index 5020040..10727e3 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -1109,35 +1109,20 @@ typedef struct /* sprintf to a "stream" */ static int -#ifdef ANSI_PROTOTYPES -objdump_sprintf (SFILE *f, const char *format, ...) -#else -objdump_sprintf (va_alist) - va_dcl -#endif +objdump_sprintf VPARAMS ((SFILE *f, const char *format, ...)) { -#ifndef ANSI_PROTOTYPES - SFILE *f; - const char *format; -#endif char *buf; - va_list args; size_t n; -#ifdef ANSI_PROTOTYPES - va_start (args, format); -#else - va_start (args); - f = va_arg (args, SFILE *); - format = va_arg (args, const char *); -#endif + VA_OPEN (args, format); + VA_FIXEDARG (args, SFILE *, f); + VA_FIXEDARG (args, const char *, format); vasprintf (&buf, format, args); - va_end (args); - if (buf == NULL) { + va_end (args); fatal (_("Out of virtual memory")); } @@ -1159,6 +1144,7 @@ objdump_sprintf (va_alist) free (buf); + VA_CLOSE (args); return n; } |