From 1287dabd0b23326be491125698dd982e4ae28887 Mon Sep 17 00:00:00 2001 From: x2018 Date: Tue, 26 Oct 2021 15:16:18 +0800 Subject: fix some code with obvious wrong coding style Reviewed-by: Tomas Mraz Reviewed-by: Richard Levitte Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/16918) --- engines/e_afalg.c | 4 ++-- engines/e_capi.c | 4 ++-- engines/e_devcrypto.c | 2 +- engines/e_ossltest.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/e_afalg.c b/engines/e_afalg.c index 2c08cbb28d..193508430a 100644 --- a/engines/e_afalg.c +++ b/engines/e_afalg.c @@ -787,7 +787,7 @@ static int bind_afalg(ENGINE *e) * now, as bind_aflag can only be called by one thread at a * time. */ - for(i = 0; i < OSSL_NELEM(afalg_cipher_nids); i++) { + for (i = 0; i < OSSL_NELEM(afalg_cipher_nids); i++) { if (afalg_aes_cbc(afalg_cipher_nids[i]) == NULL) { AFALGerr(AFALG_F_BIND_AFALG, AFALG_R_INIT_FAILED); return 0; @@ -916,7 +916,7 @@ static int afalg_finish(ENGINE *e) static int free_cbc(void) { short unsigned int i; - for(i = 0; i < OSSL_NELEM(afalg_cipher_nids); i++) { + for (i = 0; i < OSSL_NELEM(afalg_cipher_nids); i++) { EVP_CIPHER_meth_free(cbc_handle[i]._hidden); cbc_handle[i]._hidden = NULL; } diff --git a/engines/e_capi.c b/engines/e_capi.c index 6f223a6922..3c747cbecd 100644 --- a/engines/e_capi.c +++ b/engines/e_capi.c @@ -425,7 +425,7 @@ static int capi_init(ENGINE *e) /* Setup RSA_METHOD */ rsa_capi_idx = RSA_get_ex_new_index(0, NULL, NULL, NULL, 0); ossl_rsa_meth = RSA_PKCS1_OpenSSL(); - if ( !RSA_meth_set_pub_enc(capi_rsa_method, + if (!RSA_meth_set_pub_enc(capi_rsa_method, RSA_meth_get_pub_enc(ossl_rsa_meth)) || !RSA_meth_set_pub_dec(capi_rsa_method, RSA_meth_get_pub_dec(ossl_rsa_meth)) @@ -444,7 +444,7 @@ static int capi_init(ENGINE *e) /* Setup DSA Method */ dsa_capi_idx = DSA_get_ex_new_index(0, NULL, NULL, NULL, 0); ossl_dsa_meth = DSA_OpenSSL(); - if ( !DSA_meth_set_sign(capi_dsa_method, capi_dsa_do_sign) + if (!DSA_meth_set_sign(capi_dsa_method, capi_dsa_do_sign) || !DSA_meth_set_verify(capi_dsa_method, DSA_meth_get_verify(ossl_dsa_meth)) || !DSA_meth_set_finish(capi_dsa_method, capi_dsa_free) diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c index fa01317db5..adf53d8d91 100644 --- a/engines/e_devcrypto.c +++ b/engines/e_devcrypto.c @@ -633,7 +633,7 @@ static void dump_cipher_info(void) fprintf (stderr, "Cipher %s, NID=%d, /dev/crypto info: id=%d, ", name ? name : "unknown", cipher_data[i].nid, cipher_data[i].devcryptoid); - if (cipher_driver_info[i].status == DEVCRYPTO_STATUS_NO_CIOCGSESSION ) { + if (cipher_driver_info[i].status == DEVCRYPTO_STATUS_NO_CIOCGSESSION) { fprintf (stderr, "CIOCGSESSION (session open call) failed\n"); continue; } diff --git a/engines/e_ossltest.c b/engines/e_ossltest.c index 0506faa628..df0805b197 100644 --- a/engines/e_ossltest.c +++ b/engines/e_ossltest.c @@ -765,7 +765,7 @@ static int ossltest_aes128_gcm_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, if (ret <= 0) return ret; - switch(type) { + switch (type) { case EVP_CTRL_AEAD_GET_TAG: /* Always give the same tag */ memset(ptr, 0, EVP_GCM_TLS_TAG_LEN); -- cgit v1.2.3