diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2015-12-14 18:47:13 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2015-12-14 18:47:13 +0100 |
commit | 59aba93c21b9602bb29324581e67c03cede8bf88 (patch) | |
tree | accc8460c027b8e025b5ac024af065b0ddf61859 /mpq | |
parent | 25471cd16e1f3d1d7fc65c87fb2bd67e2e7d4219 (diff) | |
download | gmp-59aba93c21b9602bb29324581e67c03cede8bf88.tar.gz |
mp?/clears.c, mp?/inits.c: Stop supporting empty lists.
Diffstat (limited to 'mpq')
-rw-r--r-- | mpq/clears.c | 3 | ||||
-rw-r--r-- | mpq/inits.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/mpq/clears.c b/mpq/clears.c index 73e5f6624..c5f6539a6 100644 --- a/mpq/clears.c +++ b/mpq/clears.c @@ -39,12 +39,13 @@ mpq_clears (mpq_ptr x, ...) va_start (ap, x); - while (x != NULL) + do { __GMP_FREE_FUNC_LIMBS (PTR(NUM(x)), ALLOC(NUM(x))); __GMP_FREE_FUNC_LIMBS (PTR(DEN(x)), ALLOC(DEN(x))); x = va_arg (ap, mpq_ptr); } + while (x != NULL); va_end (ap); } diff --git a/mpq/inits.c b/mpq/inits.c index bb14f93e2..084c71e00 100644 --- a/mpq/inits.c +++ b/mpq/inits.c @@ -39,11 +39,12 @@ mpq_inits (mpq_ptr x, ...) va_start (ap, x); - while (x != NULL) + do { mpq_init (x); x = va_arg (ap, mpq_ptr); } + while (x != NULL); va_end (ap); } |