From: Alan Modra Date: Thu, 5 Dec 2019 10:59:21 +0000 (+1030) Subject: Re: PR25244, --print-memory-usage, division by zero if MEMORY length is zero X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2410edcd3176d81d0ab8d24afe69f0d59649f69e;p=binutils-gdb.git Re: PR25244, --print-memory-usage, division by zero if MEMORY length is zero Do print the linefeed when length is zero. PR 25244 * ldlang.c (lang_print_memory_usage): Correct last patch. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index b3318cbcdba..eb15dacdbdb 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2019-12-05 Alan Modra + + PR 25244 + * ldlang.c (lang_print_memory_usage): Correct last patch. + 2019-12-05 Alan Modra PR 25243 diff --git a/ld/ldlang.c b/ld/ldlang.c index bb3cd912157..05ea0c881f8 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -9281,7 +9281,8 @@ lang_print_memory_usage (void) if (r->length != 0) { double percent = used_length * 100.0 / r->length; - printf (" %6.2f%%\n", percent); + printf (" %6.2f%%", percent); } + printf ("\n"); } }