From: deraadt Date: Thu, 17 Apr 2014 21:55:07 +0000 (+0000) Subject: oops, exit vs return; spotted by matthew X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5b38deae9e9f0eed5a9333e736b2daca058fdc7f;p=openbsd oops, exit vs return; spotted by matthew --- diff --git a/lib/libssl/src/apps/dgst.c b/lib/libssl/src/apps/dgst.c index 4a4fa6ff555..08641f1c5c0 100644 --- a/lib/libssl/src/apps/dgst.c +++ b/lib/libssl/src/apps/dgst.c @@ -507,7 +507,7 @@ end: if (bmd != NULL) BIO_free(bmd); apps_shutdown(); - exit(err); + return(err); } int diff --git a/lib/libssl/src/apps/nseq.c b/lib/libssl/src/apps/nseq.c index a965f1d703a..cb83570562e 100644 --- a/lib/libssl/src/apps/nseq.c +++ b/lib/libssl/src/apps/nseq.c @@ -102,7 +102,7 @@ int MAIN(int argc, char **argv) BIO_printf (bio_err, "-in file input file\n"); BIO_printf (bio_err, "-out file output file\n"); BIO_printf (bio_err, "-toseq output NS Sequence file\n"); - exit(1); + return(1); } if (infile) { diff --git a/lib/libssl/src/apps/passwd.c b/lib/libssl/src/apps/passwd.c index ea62a14487d..7f99e3fd236 100644 --- a/lib/libssl/src/apps/passwd.c +++ b/lib/libssl/src/apps/passwd.c @@ -497,6 +497,6 @@ err: int MAIN(int argc, char **argv) { fputs("Program not available.\n", stderr) - exit(1); + return(1); } #endif diff --git a/lib/libssl/src/apps/pkcs12.c b/lib/libssl/src/apps/pkcs12.c index 74d063ef5e4..465ff2ebf0d 100644 --- a/lib/libssl/src/apps/pkcs12.c +++ b/lib/libssl/src/apps/pkcs12.c @@ -692,7 +692,7 @@ int MAIN(int argc, char **argv) if(passin) free(passin); if(passout) free(passout); apps_shutdown(); - exit(ret); + return(ret); } int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass, diff --git a/lib/libssl/src/apps/req.c b/lib/libssl/src/apps/req.c index 527b893a280..690ec0d625d 100644 --- a/lib/libssl/src/apps/req.c +++ b/lib/libssl/src/apps/req.c @@ -1097,7 +1097,7 @@ end: if(passargout && passout) free(passout); OBJ_cleanup(); apps_shutdown(); - exit(ex); + return(ex); } static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int multirdn, diff --git a/lib/libssl/src/apps/speed.c b/lib/libssl/src/apps/speed.c index 59f28e4d58b..473dfce1248 100644 --- a/lib/libssl/src/apps/speed.c +++ b/lib/libssl/src/apps/speed.c @@ -2522,7 +2522,7 @@ end: #endif apps_shutdown(); - exit(mret); + return(mret); } static void print_message(const char *s, long num, int length) diff --git a/lib/libssl/src/apps/verify.c b/lib/libssl/src/apps/verify.c index 135d76d6673..ebd314d7cca 100644 --- a/lib/libssl/src/apps/verify.c +++ b/lib/libssl/src/apps/verify.c @@ -260,7 +260,7 @@ end: sk_X509_pop_free(trusted, X509_free); sk_X509_CRL_pop_free(crls, X509_CRL_free); apps_shutdown(); - exit(ret < 0 ? 2 : ret); + return(ret < 0 ? 2 : ret); } static int check(X509_STORE *ctx, char *file,