summaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorx2018 <xkernel.wang@foxmail.com>2021-10-26 15:16:18 +0800
committerPauli <pauli@openssl.org>2021-10-28 13:10:46 +1000
commit1287dabd0b23326be491125698dd982e4ae28887 (patch)
tree3d6a62803bdd3d8ca9378eda3e7316a9c995c001 /engines
parent01451721afebabd0b7bdcd4cb3a183c9b590d266 (diff)
downloadopenssl-new-1287dabd0b23326be491125698dd982e4ae28887.tar.gz
fix some code with obvious wrong coding style
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16918)
Diffstat (limited to 'engines')
-rw-r--r--engines/e_afalg.c4
-rw-r--r--engines/e_capi.c4
-rw-r--r--engines/e_devcrypto.c2
-rw-r--r--engines/e_ossltest.c2
4 files changed, 6 insertions, 6 deletions
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);