aboutsummaryrefslogtreecommitdiff
path: root/src/libsec/port/genprime.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-04-01 19:24:03 +0000
committerrsc <devnull@localhost>2006-04-01 19:24:03 +0000
commitcbeb0b26e4c7caa8d1b47de791a7418dc20a4567 (patch)
treee0f7e445de1aa22a42ef873dc4b1118a8105ae93 /src/libsec/port/genprime.c
parent226d80b8213821af0cbf092d1507c52b504fd368 (diff)
downloadplan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.tar.gz
plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.tar.bz2
plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.zip
Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.
Diffstat (limited to 'src/libsec/port/genprime.c')
-rw-r--r--src/libsec/port/genprime.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsec/port/genprime.c b/src/libsec/port/genprime.c
index c0e16d92..25a3f0e2 100644
--- a/src/libsec/port/genprime.c
+++ b/src/libsec/port/genprime.c
@@ -2,13 +2,13 @@
#include <mp.h>
#include <libsec.h>
-// generate a probable prime. accuracy is the miller-rabin interations
+/* generate a probable prime. accuracy is the miller-rabin interations */
void
genprime(mpint *p, int n, int accuracy)
{
mpdigit x;
- // generate n random bits with high and low bits set
+ /* generate n random bits with high and low bits set */
mpbits(p, n);
genrandom((uchar*)p->p, (n+7)/8);
p->top = (n+Dbits-1)/Dbits;
@@ -18,7 +18,7 @@ genprime(mpint *p, int n, int accuracy)
p->p[p->top-1] |= x;
p->p[0] |= 1;
- // keep icrementing till it looks prime
+ /* keep icrementing till it looks prime */
for(;;){
if(probably_prime(p, accuracy))
break;