correct macro.
[openssl.git] / crypto / bn / bntest.c
index cec21646da6a4ed32db6a9b028f075b957751917..503c4f390135f8143b126d8fd9f723255271b4c9 100644 (file)
@@ -104,10 +104,10 @@ static unsigned char lst[]="\xC6\x4F\x43\x04\x2A\xEA\xCA\x6E\x58\x36\x80\x5B\xE8
 
 static const char rnd_seed[] = "string to make the random number generator think it has entropy";
 
-void message(BIO *out, char *m)
+static void message(BIO *out, char *m)
        {
        fprintf(stderr, "test %s\n", m);
-#if defined(linux) || defined(FreeBSD) /* can we use GNU bc features? */
+#if defined(linux) || defined(__FreeBSD__) /* can we use GNU bc features? */
        BIO_puts(out, "print \"test ");
        BIO_puts(out, m);
        BIO_puts(out, "\\n\"\n");
@@ -615,7 +615,7 @@ int test_mont(BIO *bp, BN_CTX *ctx)
        BN_rand(&b,100,0,0); /**/
        for (i=0; i<num2; i++)
                {
-               int bits = (100%BN_BITS2+1)*BN_BITS2*i*BN_BITS2;
+               int bits = (200*(i+1))/num2;
 
                if (bits == 0)
                        continue;