PR: 2062
[openssl.git] / crypto / bn / bntest.c
index 565590a1f17bf58a6012dc7ebb879642467adf56..0cd99c5b4bb11f03daab7792493e7eec0e15dbd7 100644 (file)
@@ -928,7 +928,7 @@ int test_mod_exp(BIO *bp, BN_CTX *ctx)
                BN_bntest_rand(b,2+i,0,0); /**/
 
                if (!BN_mod_exp(d,a,b,c,ctx))
-                       return(00);
+                       return(0);
 
                if (bp != NULL)
                        {
@@ -1029,8 +1029,8 @@ int test_exp(BIO *bp, BN_CTX *ctx)
                BN_bntest_rand(a,20+i*5,0,0); /**/
                BN_bntest_rand(b,2+i,0,0); /**/
 
-               if (!BN_exp(d,a,b,ctx))
-                       return(00);
+               if (BN_exp(d,a,b,ctx) <= 0)
+                       return(0);
 
                if (bp != NULL)
                        {