summaryrefslogtreecommitdiff
path: root/ld/ldmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldmisc.c')
-rw-r--r--ld/ldmisc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index 5112c716a4..ca1896ff1c 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 == '%')
{