gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, feature/api-mpfr, updated. gawk-4.1.0-25


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, feature/api-mpfr, updated. gawk-4.1.0-2595-g3978dea
Date: Thu, 13 Apr 2017 12:47:44 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, feature/api-mpfr has been updated
       via  3978dea8ddf29e8185cf61d5fba897d58439cade (commit)
      from  3e6d7cb2ac0e05aaca43b923cc9e2b408f390d01 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=3978dea8ddf29e8185cf61d5fba897d58439cade

commit 3978dea8ddf29e8185cf61d5fba897d58439cade
Author: Andrew J. Schorr <address@hidden>
Date:   Thu Apr 13 12:47:18 2017 -0400

    For intdiv mpfr division by zero, call fatal without further ado.

diff --git a/extension/ChangeLog b/extension/ChangeLog
index 784daf2..d8eb618 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-13         Andrew J. Schorr     <address@hidden>
+
+       * intdiv.c (do_intdiv): On a division by zero fatal error, there's
+       no need to clear the numerator and denominator and add a fake return.
+
 2017-04-13         Arnold D. Robbins     <address@hidden>
 
        * configure.ac: Alphabetize function list in AC_CHECK_FUNCS.
diff --git a/extension/intdiv.c b/extension/intdiv.c
index bde9289..e3dd0ee 100644
--- a/extension/intdiv.c
+++ b/extension/intdiv.c
@@ -161,16 +161,8 @@ do_intdiv(int nargs, awk_value_t *result, struct 
awk_ext_func *unused)
                                mpz_clear(numer);
                        return make_number(-1, result);
                }
-               if (mpz_sgn(denom) == 0) {
-                       if (numer == numer_tmp)
-                               mpz_clear(numer);
-                       if (denom == denom_tmp)
-                               mpz_clear(denom);
-
+               if (mpz_sgn(denom) == 0)
                        fatal(ext_id, _("intdiv: division by zero attempted"));
-                       // won't get here, but keep the compiler happy
-                       return make_number(-1, result);
-               }
 
                /* ask gawk to allocate return values for us */
                quotient = get_mpz_ptr();

-----------------------------------------------------------------------

Summary of changes:
 extension/ChangeLog |  5 +++++
 extension/intdiv.c  | 10 +---------
 2 files changed, 6 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]