summaryrefslogtreecommitdiff
path: root/mpf
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2015-10-13 22:39:14 +0200
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2015-10-13 22:39:14 +0200
commitd00ec57adc1e28e18eee0a94082e85e78bec8a12 (patch)
treec125ee8e1250bf893964a75d5689e26952d9da9d /mpf
parent5ff4a26fce97d96641b95c477ba09fd2ec1068d7 (diff)
downloadgmp-d00ec57adc1e28e18eee0a94082e85e78bec8a12.tar.gz
mp?/clears.c, mp?/inits.c: Support empty list
Diffstat (limited to 'mpf')
-rw-r--r--mpf/clears.c3
-rw-r--r--mpf/inits.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/mpf/clears.c b/mpf/clears.c
index 17eca8208..68a4cbebd 100644
--- a/mpf/clears.c
+++ b/mpf/clears.c
@@ -39,12 +39,11 @@ mpf_clears (mpf_ptr x, ...)
va_start (ap, x);
- do
+ while (x != NULL)
{
__GMP_FREE_FUNC_LIMBS (PTR(x), PREC(x) + 1);
x = va_arg (ap, mpf_ptr);
}
- while (x != NULL);
va_end (ap);
}
diff --git a/mpf/inits.c b/mpf/inits.c
index ddcf1141a..db7cacc42 100644
--- a/mpf/inits.c
+++ b/mpf/inits.c
@@ -39,12 +39,11 @@ mpf_inits (mpf_ptr x, ...)
va_start (ap, x);
- do
+ while (x != NULL)
{
mpf_init (x);
x = va_arg (ap, mpf_ptr);
}
- while (x != NULL);
va_end (ap);
}