projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move the @mpmont_factor@ structure and rename it now that it's used for
[u/mdw/catacomb]
/
mpmont.c
diff --git
a/mpmont.c
b/mpmont.c
index
d000f8d
..
d051778
100644
(file)
--- a/
mpmont.c
+++ b/
mpmont.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: mpmont.c,v 1.1
2 2000/10/08 15:48:35
mdw Exp $
+ * $Id: mpmont.c,v 1.1
4 2001/02/22 09:04:26
mdw Exp $
*
* Montgomery reduction
*
*
* Montgomery reduction
*
@@
-30,6
+30,13
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: mpmont.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: mpmont.c,v $
+ * Revision 1.14 2001/02/22 09:04:26 mdw
+ * Cosmetic fix.
+ *
+ * Revision 1.13 2001/02/03 12:00:29 mdw
+ * Now @mp_drop@ checks its argument is non-NULL before attempting to free
+ * it. Note that the macro version @MP_DROP@ doesn't do this.
+ *
* Revision 1.12 2000/10/08 15:48:35 mdw
* Rename Karatsuba constants now that we have @gfx_kmul@ too.
*
* Revision 1.12 2000/10/08 15:48:35 mdw
* Rename Karatsuba constants now that we have @gfx_kmul@ too.
*
@@
-468,9
+475,8
@@
mp *mpmont_expr(mpmont *mm, mp *d, mp *a, mp *e)
*/
MP_RSTEP(&sc);
*/
MP_RSTEP(&sc);
- while (!MP_RBIT(&sc))
{
+ while (!MP_RBIT(&sc))
MP_RSTEP(&sc);
MP_RSTEP(&sc);
- }
/* --- Now for the main work --- */
/* --- Now for the main work --- */
@@
-548,10
+554,8
@@
done:
mp_drop(tab[i]);
xfree(tab);
exit:
mp_drop(tab[i]);
xfree(tab);
exit:
- if (d != MP_NEW)
- mp_drop(d);
- if (spare)
- mp_drop(spare);
+ mp_drop(d);
+ mp_drop(spare);
return (x);
}
return (x);
}