diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2020-10-25 18:24:13 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2020-10-25 18:24:13 +0100 |
commit | 9781a2b732221ab9f9eafa0bccd85e99265c46b2 (patch) | |
tree | 16f4e0cc4095cbf86f8e23a9d30549587be21ba8 /mini-gmp | |
parent | d210c53eb4af7174b9561208e6ff7745d2b5f9b3 (diff) | |
download | gmp-9781a2b732221ab9f9eafa0bccd85e99265c46b2.tar.gz |
mini-mpq.c (mpq_canonical_sign): Use the correct type for size
Diffstat (limited to 'mini-gmp')
-rw-r--r-- | mini-gmp/mini-mpq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mini-gmp/mini-mpq.c b/mini-gmp/mini-mpq.c index 8c3de9a24..d781242c2 100644 --- a/mini-gmp/mini-mpq.c +++ b/mini-gmp/mini-mpq.c @@ -5,7 +5,7 @@ Acknowledgment: special thanks to Bradley Lucier for his comments to the preliminary version of this code. -Copyright 2018, 2019 Free Software Foundation, Inc. +Copyright 2018-2020 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -107,10 +107,10 @@ mpq_clear (mpq_t x) static void mpq_canonical_sign (mpq_t r) { - int cmp = mpq_denref (r)->_mp_size; - if (cmp <= 0) + mp_size_t ds = mpq_denref (r)->_mp_size; + if (ds <= 0) { - if (cmp == 0) + if (ds == 0) gmp_die("mpq: Fraction with zero denominator."); mpz_neg (mpq_denref (r), mpq_denref (r)); mpz_neg (mpq_numref (r), mpq_numref (r)); |