Skip to content
Snippets Groups Projects
Commit f2c700a1 authored by Florian Prill's avatar Florian Prill
Browse files

replaced mpz commands for multi-init and multi-deallocate by standard ones.

parent eeabeb9c
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,13 @@ int divide_timespan_mpz(const t_int days1, const t_int day_fraction1,
{
mpz_t a0, a1, a2, b1, b2, q, r;
mpz_inits(a0,a1,a2,b1,b2,q,r,NULL);
mpz_init(a0);
mpz_init(a1);
mpz_init(a2);
mpz_init(b1);
mpz_init(b2);
mpz_init(q);
mpz_init(r);
mpz_set_ui(a0, 86400000);
mpz_set_ui(a1,days1);
......@@ -94,6 +100,12 @@ int divide_timespan_mpz(const t_int days1, const t_int day_fraction1,
*remainder_days = mpz_get_ui(a2);
*remainder_ms = mpz_get_ui(b2);
mpz_clears(a0,a1,a2,b1,b2,q,r,NULL);
mpz_clear(a0);
mpz_clear(a1);
mpz_clear(a2);
mpz_clear(b1);
mpz_clear(b2);
mpz_clear(q);
mpz_clear(r);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment