genius r652 - in trunk: . src
- From: jirka svn gnome org
- To: svn-commits-list gnome org
- Subject: genius r652 - in trunk: . src
- Date: Tue, 20 May 2008 00:56:30 +0000 (UTC)
Author: jirka
Date: Tue May 20 00:56:30 2008
New Revision: 652
URL: http://svn.gnome.org/viewvc/genius?rev=652&view=rev
Log:
Mon May 19 19:56:37 2008 Jiri (George) Lebl <jirka 5z com>
* src/mpzextra.c: fix leak on mympz_is_prime.
Modified:
trunk/ChangeLog
trunk/src/mpzextra.c
Modified: trunk/src/mpzextra.c
==============================================================================
--- trunk/src/mpzextra.c (original)
+++ trunk/src/mpzextra.c Tue May 20 00:56:30 2008
@@ -222,11 +222,13 @@
if ( ! mympz_strong_pseudoprime_test_2_3_5_7 (n))
return 0;
- if ( ! inited_test) {
+ if G_UNLIKELY ( ! inited_test) {
/* set test to 25*10^9 */
mpz_init_set_ui (test, 10);
mpz_pow_ui (test, test, 9);
mpz_mul_ui (test, test, 25);
+
+ inited_test = TRUE;
}
/* if n < 25*10^9, we are now sure this
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]