aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-10-05 22:48:34 +0000
committerAlan Modra <amodra@gmail.com>2010-10-05 22:48:34 +0000
commit8e085dd201b4d691d1407a285a3315378afef7da (patch)
tree86fe48ba9b20d05f95ed67cc35232ddee2a2f79d
parent7d8ac8bbbb0022af4e59866881a79ce4ebe1d466 (diff)
downloadgdb-8e085dd201b4d691d1407a285a3315378afef7da.zip
gdb-8e085dd201b4d691d1407a285a3315378afef7da.tar.gz
gdb-8e085dd201b4d691d1407a285a3315378afef7da.tar.bz2
* bucomm.c (bfd_nonfatal, bfd_nonfatal_message): Don't clobber errno.
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/bucomm.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index dd2b665..ada4761 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-06 Alan Modra <amodra@gmail.com>
+
+ * bucomm.c (bfd_nonfatal, bfd_nonfatal_message): Don't clobber errno.
+
2010-10-05 Alan Modra <amodra@gmail.com>
* bucomm.c (bfd_nonfatal): Flush stdout before output to stderr.
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index ccde4bc..b30c2c5 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -54,8 +54,8 @@ bfd_nonfatal (const char *string)
{
const char *errmsg;
- fflush (stdout);
errmsg = bfd_errmsg (bfd_get_error ());
+ fflush (stdout);
if (string)
fprintf (stderr, "%s: %s: %s\n", program_name, string, errmsg);
else
@@ -84,8 +84,8 @@ bfd_nonfatal_message (const char *filename,
const char *section_name;
va_list args;
- fflush (stdout);
errmsg = bfd_errmsg (bfd_get_error ());
+ fflush (stdout);
section_name = NULL;
va_start (args, format);
fprintf (stderr, "%s", program_name);