summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bntest.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-11-28 18:54:30 +0000
committerRichard Levitte <levitte@openssl.org>2002-11-28 18:54:30 +0000
commit55f78baf32f213301a0e8d6c6e7f40bd3b9857b1 (patch)
tree1daf577fe941ef129c8657f231b060b786a03d4b /crypto/bn/bntest.c
parent6c359479d7755e6f228196e17fcdc98a05724d78 (diff)
Have all tests use EXIT() to exit rather than exit(), since the latter doesn't
always give the expected result on some platforms.
Diffstat (limited to 'crypto/bn/bntest.c')
-rw-r--r--crypto/bn/bntest.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/bn/bntest.c b/crypto/bn/bntest.c
index 689683a52d..d87ccf9c6a 100644
--- a/crypto/bn/bntest.c
+++ b/crypto/bn/bntest.c
@@ -163,10 +163,10 @@ int main(int argc, char *argv[])
ctx=BN_CTX_new();
- if (ctx == NULL) exit(1);
+ if (ctx == NULL) EXIT(1);
out=BIO_new(BIO_s_file());
- if (out == NULL) exit(1);
+ if (out == NULL) EXIT(1);
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
@@ -176,7 +176,7 @@ int main(int argc, char *argv[])
if (!BIO_write_filename(out,outfile))
{
perror(outfile);
- exit(1);
+ EXIT(1);
}
}
@@ -296,14 +296,14 @@ int main(int argc, char *argv[])
BIO_free(out);
/**/
- exit(0);
+ EXIT(0);
err:
BIO_puts(out,"1\n"); /* make sure the Perl script fed by bc notices
* the failure, see test_bn in test/Makefile.ssl*/
BIO_flush(out);
ERR_load_crypto_strings();
ERR_print_errors_fp(stderr);
- exit(1);
+ EXIT(1);
return(1);
}
@@ -546,7 +546,7 @@ int test_mul(BIO *bp)
BN_CTX *ctx;
ctx = BN_CTX_new();
- if (ctx == NULL) exit(1);
+ if (ctx == NULL) EXIT(1);
BN_init(&a);
BN_init(&b);
@@ -784,7 +784,7 @@ int test_mod_mul(BIO *bp, BN_CTX *ctx)
while ((l=ERR_get_error()))
fprintf(stderr,"ERROR:%s\n",
ERR_error_string(l,NULL));
- exit(1);
+ EXIT(1);
}
if (bp != NULL)
{