[Ecm-commits] r2600 - trunk

cvs commits ecm-commits at lists.gforge.inria.fr
Wed Feb 11 09:34:36 CET 2015


Author: zimmerma
Date: 2015-02-11 09:34:36 +0100 (Wed, 11 Feb 2015)
New Revision: 2600

Modified:
   trunk/coverage.sh
   trunk/ecm2.c
Log:
improve coverage


Modified: trunk/coverage.sh
===================================================================
--- trunk/coverage.sh	2015-02-11 07:50:00 UTC (rev 2599)
+++ trunk/coverage.sh	2015-02-11 08:34:36 UTC (rev 2600)
@@ -6,7 +6,7 @@
 svn checkout svn://scm.gforge.inria.fr/svnroot/ecm/trunk ecm
 cd ecm
 autoreconf -i
-./configure
+./configure --disable-assert
 make CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
 make longcheck VALGRIND=
 geninfo --no-checksum --ignore-errors gcov,source -q --output-filename ecm.info ./ --no-external

Modified: trunk/ecm2.c
===================================================================
--- trunk/ecm2.c	2015-02-11 07:50:00 UTC (rev 2599)
+++ trunk/ecm2.c	2015-02-11 08:34:36 UTC (rev 2600)
@@ -29,6 +29,7 @@
    max(q_i) is a power of 2). Needs up to n+2 cells in T.
    Returns whether factor was found or not found, factor goes into p. 
    No error can occur.
+   We should have n > 0.
 */
 
 static int
@@ -49,10 +50,9 @@
   mpz_t __dummy; /* used for local computations */
 #endif
 
-  if (n == 0)
-    return ECM_NO_FACTOR_FOUND;
+  ASSERT(n > 0);
   
-  /* Is S the neutral element ? */
+  /* Is S the neutral element? */
   if (mpres_is_zero (S->x, modulus) && mpres_is_zero (S->y, modulus))
     {
       for (i = 0; i < n; i++)



More information about the Ecm-commits mailing list