summaryrefslogtreecommitdiffstats
path: root/apps/speed.c
diff options
context:
space:
mode:
authorNicola Tuveri <nic.tuv@gmail.com>2016-10-04 15:50:11 +0300
committerRich Salz <rsalz@openssl.org>2016-11-17 00:36:23 -0500
commit2e4c3b5caa3596d4649dfdb8cb072a44e559d96b (patch)
treebae442279782bacab71706fac489667ca8fb958a /apps/speed.c
parent29dd15b18d9ed968a9035a69bbd913847b9c2646 (diff)
More coding style fixes
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1658)
Diffstat (limited to 'apps/speed.c')
-rw-r--r--apps/speed.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/speed.c b/apps/speed.c
index d0409e0e1c..2bd29c92ae 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -2587,8 +2587,10 @@ int speed_main(int argc, char **argv)
continue;
for (i = 0; i < loopargs_len; i++) {
- EVP_PKEY_CTX *kctx = NULL, *ctx = NULL;
- EVP_PKEY *key_A = NULL, *key_B = NULL;
+ EVP_PKEY_CTX *kctx = NULL;
+ EVP_PKEY_CTX *ctx = NULL;
+ EVP_PKEY *key_A = NULL;
+ EVP_PKEY *key_B = NULL;
size_t outlen;
if (testnum == R_EC_X25519) {
@@ -2606,7 +2608,7 @@ int speed_main(int argc, char **argv)
test_curves
[testnum]) ||
/* Create the parameter object params */
- !EVP_PKEY_paramgen(pctx, &params) || 0) {
+ !EVP_PKEY_paramgen(pctx, &params)) {
ecdh_checks = 0;
BIO_printf(bio_err, "ECDH init failure.\n");
ERR_print_errors(bio_err);
@@ -2622,8 +2624,7 @@ int speed_main(int argc, char **argv)
pctx = NULL;
}
if (!kctx || /* keygen ctx is not null */
- !EVP_PKEY_keygen_init(kctx) || /* init keygen ctx */
- 0) {
+ !EVP_PKEY_keygen_init(kctx) /* init keygen ctx */ ) {
ecdh_checks = 0;
BIO_printf(bio_err, "ECDH keygen failure.\n");
ERR_print_errors(bio_err);
@@ -2637,8 +2638,7 @@ int speed_main(int argc, char **argv)
!EVP_PKEY_derive_init(ctx) || /* init derivation ctx */
!EVP_PKEY_derive_set_peer(ctx, key_B) || /* set peer pubkey in ctx */
!EVP_PKEY_derive(ctx, NULL, &outlen) || /* determine max length */
- outlen > MAX_ECDH_SIZE || /* avoid buffer overflow */
- 0) {
+ outlen > MAX_ECDH_SIZE /* avoid buffer overflow */ ) {
ecdh_checks = 0;
BIO_printf(bio_err, "ECDH key generation failure.\n");
ERR_print_errors(bio_err);