diff options
author | Alan Modra <amodra@gmail.com> | 2021-10-25 15:42:40 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-10-25 16:47:36 +1030 |
commit | bd84a8e2e04b397892c5984813837b5e328c41da (patch) | |
tree | 132cbb152e76da76d62ff93ea7db04ea606b819b /binutils | |
parent | 1e5a28be0fafd49bd5a64f38c66631196b534f57 (diff) | |
download | gdb-bd84a8e2e04b397892c5984813837b5e328c41da.zip gdb-bd84a8e2e04b397892c5984813837b5e328c41da.tar.gz gdb-bd84a8e2e04b397892c5984813837b5e328c41da.tar.bz2 |
bfd_nonfatal_message, localise va_start
Nothing to see here, just a little tidier.
* bucomm.c (bfd_nonfatal_message): Localise va_list args.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/bucomm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/binutils/bucomm.c b/binutils/bucomm.c index 8ce66ab..655bb5d 100644 --- a/binutils/bucomm.c +++ b/binutils/bucomm.c @@ -70,7 +70,6 @@ bfd_nonfatal_message (const char *filename, { const char *errmsg; const char *section_name; - va_list args; enum bfd_error err = bfd_get_error (); if (err == bfd_error_no_error) @@ -79,7 +78,6 @@ bfd_nonfatal_message (const char *filename, errmsg = bfd_errmsg (err); fflush (stdout); section_name = NULL; - va_start (args, format); fprintf (stderr, "%s", program_name); if (abfd) @@ -96,11 +94,13 @@ bfd_nonfatal_message (const char *filename, if (format) { + va_list args; + va_start (args, format); fprintf (stderr, ": "); vfprintf (stderr, format, args); + va_end (args); } fprintf (stderr, ": %s\n", errmsg); - va_end (args); } void |