diff options
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/ldmisc.c | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 9801bda..203f986 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2012-04-02 Mike Frysinger <vapier@gentoo.org> + + * ldmisc.c (vfinfo): Assign new local str to fmt. Delete + putc call. If str and fmt are different, call fwrite on + the difference. + 2012-03-30 Nick Clifton <nickc@redhat.com> * po/vi.po: Updated Vietnamese translation. diff --git a/ld/ldmisc.c b/ld/ldmisc.c index 5112c71..ca1896f 100644 --- a/ld/ldmisc.c +++ b/ld/ldmisc.c @@ -72,11 +72,14 @@ vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning) while (*fmt != '\0') { + const char *str = fmt; while (*fmt != '%' && *fmt != '\0') - { - putc (*fmt, fp); - fmt++; - } + fmt++; + if (fmt != str) + if (fwrite (str, 1, fmt - str, fp)) + { + /* Ignore. */ + } if (*fmt == '%') { |