From: Alan Modra Date: Tue, 5 Oct 2010 22:48:34 +0000 (+0000) Subject: * bucomm.c (bfd_nonfatal, bfd_nonfatal_message): Don't clobber errno. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e085dd201b4d691d1407a285a3315378afef7da;p=binutils-gdb.git * bucomm.c (bfd_nonfatal, bfd_nonfatal_message): Don't clobber errno. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index dd2b6653dce..ada47611d0c 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2010-10-06 Alan Modra + + * bucomm.c (bfd_nonfatal, bfd_nonfatal_message): Don't clobber errno. + 2010-10-05 Alan Modra * bucomm.c (bfd_nonfatal): Flush stdout before output to stderr. diff --git a/binutils/bucomm.c b/binutils/bucomm.c index ccde4bc9620..b30c2c519bf 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);