* po/da.po: Updated Danish translation.
[deliverable/binutils-gdb.git] / binutils / bucomm.c
index 26cb09efb42b22ced5f49084d786301462c2d01e..9bbdafb9061b6ac159802710d41047af6966c5d4 100644 (file)
@@ -1,6 +1,6 @@
 /* bucomm.c -- Bin Utils COMmon code.
    Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002,
-   2003, 2006, 2007
+   2003, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
@@ -88,7 +88,7 @@ bfd_nonfatal_message (const char *filename,
   if (bfd)
     {
       if (!filename)
-       filename = bfd_get_filename (bfd);
+       filename = bfd_get_archive_filename (bfd);
       if (section)
        section_name = bfd_get_section_name (bfd, section);
     }
@@ -195,16 +195,18 @@ list_supported_targets (const char *name, FILE *f)
 void
 list_supported_architectures (const char *name, FILE *f)
 {
-  const char **arch;
+  const char ** arch;
+  const char ** arches;
 
   if (name == NULL)
     fprintf (f, _("Supported architectures:"));
   else
     fprintf (f, _("%s: supported architectures:"), name);
 
-  for (arch = bfd_arch_list (); *arch; arch++)
+  for (arch = arches = bfd_arch_list (); *arch; arch++)
     fprintf (f, " %s", *arch);
   fprintf (f, "\n");
+  free (arches);
 }
 \f
 /* The length of the longest architecture name + 1.  */
@@ -575,7 +577,7 @@ get_file_size (const char * file_name)
 /* Return the filename in a static buffer.  */
 
 const char *
-bfd_get_archive_filename (bfd *abfd)
+bfd_get_archive_filename (const bfd *abfd)
 {
   static size_t curr = 0;
   static char *buf;
This page took 0.023641 seconds and 4 git commands to generate.