summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorViktor Dukhovni <openssl-users@dukhovni.org>2015-04-16 01:50:03 -0400
committerViktor Dukhovni <openssl-users@dukhovni.org>2015-04-16 13:44:59 -0400
commit61986d32f37cbaeaed08bd955ff27d35b72ea29a (patch)
treea93f68aa58dd5dea6550887b9f44796d92a5b183 /crypto
parentb65558328a9fcda5cef38857f9cc033c15ec1c32 (diff)
Code style: space after 'if'
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/asn1/bio_ndef.c4
-rw-r--r--crypto/asn1/tasn_prn.c2
-rw-r--r--crypto/asn1/x_x509.c4
-rw-r--r--crypto/bio/b_print.c4
-rw-r--r--crypto/bio/bss_dgram.c4
-rw-r--r--crypto/cms/cms_pwri.c2
-rw-r--r--crypto/dh/dh_ameth.c2
-rw-r--r--crypto/dh/dh_pmeth.c2
-rw-r--r--crypto/dsa/dsa_ossl.c8
-rw-r--r--crypto/dso/dso_lib.c2
-rw-r--r--crypto/dso/dso_vms.c2
-rw-r--r--crypto/hmac/hmac.c12
-rw-r--r--crypto/objects/o_names.c2
-rw-r--r--crypto/rand/rand_os2.c2
-rw-r--r--crypto/threads/th-lock.c12
-rw-r--r--crypto/x509v3/v3_cpols.c8
16 files changed, 36 insertions, 36 deletions
diff --git a/crypto/asn1/bio_ndef.c b/crypto/asn1/bio_ndef.c
index 1018787a63..99ab5f66e1 100644
--- a/crypto/asn1/bio_ndef.c
+++ b/crypto/asn1/bio_ndef.c
@@ -161,7 +161,7 @@ static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg)
derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it);
p = OPENSSL_malloc(derlen);
- if(!p)
+ if (!p)
return 0;
ndef_aux->derbuf = p;
@@ -231,7 +231,7 @@ static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg)
derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it);
p = OPENSSL_malloc(derlen);
- if(!p)
+ if (!p)
return 0;
ndef_aux->derbuf = p;
diff --git a/crypto/asn1/tasn_prn.c b/crypto/asn1/tasn_prn.c
index d1e5ba509a..76d584b2ba 100644
--- a/crypto/asn1/tasn_prn.c
+++ b/crypto/asn1/tasn_prn.c
@@ -287,7 +287,7 @@ static int asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,
for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
const ASN1_TEMPLATE *seqtt;
seqtt = asn1_do_adb(fld, tt, 1);
- if(!seqtt)
+ if (!seqtt)
return 0;
tmpfld = asn1_get_field_ptr(fld, seqtt);
if (!asn1_template_print_ctx(out, tmpfld,
diff --git a/crypto/asn1/x_x509.c b/crypto/asn1/x_x509.c
index 36f6ff4362..08bb4bd33c 100644
--- a/crypto/asn1/x_x509.c
+++ b/crypto/asn1/x_x509.c
@@ -173,7 +173,7 @@ X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length)
/* Save start position */
q = *pp;
- if(!a || *a == NULL) {
+ if (!a || *a == NULL) {
freeret = 1;
}
ret = d2i_X509(a, pp, length);
@@ -188,7 +188,7 @@ X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length)
goto err;
return ret;
err:
- if(freeret) {
+ if (freeret) {
X509_free(ret);
if (a)
*a = NULL;
diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c
index c2cf6e619e..452e5cfd95 100644
--- a/crypto/bio/b_print.c
+++ b/crypto/bio/b_print.c
@@ -710,7 +710,7 @@ doapr_outch(char **sbuffer,
if (*maxlen == 0)
*maxlen = 1024;
*buffer = OPENSSL_malloc(*maxlen);
- if(!*buffer) {
+ if (!*buffer) {
/* Panic! Can't really do anything sensible. Just return */
return;
}
@@ -722,7 +722,7 @@ doapr_outch(char **sbuffer,
} else {
*maxlen += 1024;
*buffer = OPENSSL_realloc(*buffer, *maxlen);
- if(!*buffer) {
+ if (!*buffer) {
/* Panic! Can't really do anything sensible. Just return */
return;
}
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index ed275d1cb1..4fa6279d05 100644
--- a/crypto/bio/bss_dgram.c
+++ b/crypto/bio/bss_dgram.c
@@ -998,7 +998,7 @@ BIO *BIO_new_dgram_sctp(int fd, int close_flag)
*/
sockopt_len = (socklen_t) (sizeof(sctp_assoc_t) + 256 * sizeof(uint8_t));
authchunks = OPENSSL_malloc(sockopt_len);
- if(!authchunks) {
+ if (!authchunks) {
BIO_vfree(bio);
return (NULL);
}
@@ -1409,7 +1409,7 @@ static int dgram_sctp_write(BIO *b, const char *in, int inl)
if (data->save_shutdown && !BIO_dgram_sctp_wait_for_dry(b)) {
char *tmp;
data->saved_message.bio = b;
- if(!(tmp = OPENSSL_malloc(inl))) {
+ if (!(tmp = OPENSSL_malloc(inl))) {
BIOerr(BIO_F_DGRAM_SCTP_WRITE, ERR_R_MALLOC_FAILURE);
return -1;
}
diff --git a/crypto/cms/cms_pwri.c b/crypto/cms/cms_pwri.c
index 4f1b31d8ae..e11b1fa4ac 100644
--- a/crypto/cms/cms_pwri.c
+++ b/crypto/cms/cms_pwri.c
@@ -231,7 +231,7 @@ static int kek_unwrap_key(unsigned char *out, size_t *outlen,
return 0;
}
tmp = OPENSSL_malloc(inlen);
- if(!tmp)
+ if (!tmp)
return 0;
/* setup IV by decrypting last two blocks */
if (!EVP_DecryptUpdate(ctx, tmp + inlen - 2 * blocklen, &outl,
diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c
index cfa2e2dbec..4b22ec47b9 100644
--- a/crypto/dh/dh_ameth.c
+++ b/crypto/dh/dh_ameth.c
@@ -159,7 +159,7 @@ static int dh_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
dh = pkey->pkey.dh;
str = ASN1_STRING_new();
- if(!str) {
+ if (!str) {
DHerr(DH_F_DH_PUB_ENCODE, ERR_R_MALLOC_FAILURE);
goto err;
}
diff --git a/crypto/dh/dh_pmeth.c b/crypto/dh/dh_pmeth.c
index 5e3a5e3fef..3fad0548a1 100644
--- a/crypto/dh/dh_pmeth.c
+++ b/crypto/dh/dh_pmeth.c
@@ -466,7 +466,7 @@ static int pkey_dh_derive(EVP_PKEY_CTX *ctx, unsigned char *key,
ret = 0;
Zlen = DH_size(dh);
Z = OPENSSL_malloc(Zlen);
- if(!Z) {
+ if (!Z) {
goto err;
}
if (DH_compute_key_padded(Z, dhpub, dh) <= 0)
diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c
index 96f5d6fed1..325eac479b 100644
--- a/crypto/dsa/dsa_ossl.c
+++ b/crypto/dsa/dsa_ossl.c
@@ -108,23 +108,23 @@ static DSA_METHOD openssl_dsa_meth = {
#define DSA_MOD_EXP(err_instr,dsa,rr,a1,p1,a2,p2,m,ctx,in_mont) \
do { \
int _tmp_res53; \
- if((dsa)->meth->dsa_mod_exp) \
+ if ((dsa)->meth->dsa_mod_exp) \
_tmp_res53 = (dsa)->meth->dsa_mod_exp((dsa), (rr), (a1), (p1), \
(a2), (p2), (m), (ctx), (in_mont)); \
else \
_tmp_res53 = BN_mod_exp2_mont((rr), (a1), (p1), (a2), (p2), \
(m), (ctx), (in_mont)); \
- if(!_tmp_res53) err_instr; \
+ if (!_tmp_res53) err_instr; \
} while(0)
#define DSA_BN_MOD_EXP(err_instr,dsa,r,a,p,m,ctx,m_ctx) \
do { \
int _tmp_res53; \
- if((dsa)->meth->bn_mod_exp) \
+ if ((dsa)->meth->bn_mod_exp) \
_tmp_res53 = (dsa)->meth->bn_mod_exp((dsa), (r), (a), (p), \
(m), (ctx), (m_ctx)); \
else \
_tmp_res53 = BN_mod_exp_mont((r), (a), (p), (m), (ctx), (m_ctx)); \
- if(!_tmp_res53) err_instr; \
+ if (!_tmp_res53) err_instr; \
} while(0)
const DSA_METHOD *DSA_OpenSSL(void)
diff --git a/crypto/dso/dso_lib.c b/crypto/dso/dso_lib.c
index d2a48bb664..09b8eafcca 100644
--- a/crypto/dso/dso_lib.c
+++ b/crypto/dso/dso_lib.c
@@ -285,7 +285,7 @@ DSO_FUNC_TYPE DSO_bind_func(DSO *dso, const char *symname)
* honest. For one thing, I think I have to return a negative value for any
* error because possible DSO_ctrl() commands may return values such as
* "size"s that can legitimately be zero (making the standard
- * "if(DSO_cmd(...))" form that works almost everywhere else fail at odd
+ * "if (DSO_cmd(...))" form that works almost everywhere else fail at odd
* times. I'd prefer "output" values to be passed by reference and the return
* value as success/failure like usual ... but we conform when we must... :-)
*/
diff --git a/crypto/dso/dso_vms.c b/crypto/dso/dso_vms.c
index d3c4eab269..79bbd97122 100644
--- a/crypto/dso/dso_vms.c
+++ b/crypto/dso/dso_vms.c
@@ -527,7 +527,7 @@ static char *vms_name_converter(DSO *dso, const char *filename)
{
int len = strlen(filename);
char *not_translated = OPENSSL_malloc(len + 1);
- if(not_translated)
+ if (not_translated)
strcpy(not_translated, filename);
return (not_translated);
}
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c
index 8ee5b2ac19..ccfd16e08d 100644
--- a/crypto/hmac/hmac.c
+++ b/crypto/hmac/hmac.c
@@ -71,13 +71,13 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
if (md != NULL) {
reset = 1;
ctx->md = md;
- } else if(ctx->md) {
+ } else if (ctx->md) {
md = ctx->md;
} else {
return 0;
}
- if(!ctx->key_init && key == NULL)
+ if (!ctx->key_init && key == NULL)
return 0;
if (key != NULL) {
@@ -93,7 +93,7 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
&ctx->key_length))
goto err;
} else {
- if(len < 0 || len > (int)sizeof(ctx->key))
+ if (len < 0 || len > (int)sizeof(ctx->key))
return 0;
memcpy(ctx->key, key, len);
ctx->key_length = len;
@@ -137,7 +137,7 @@ int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md)
int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len)
{
- if(!ctx->key_init)
+ if (!ctx->key_init)
return 0;
return EVP_DigestUpdate(&ctx->md_ctx, data, len);
}
@@ -147,7 +147,7 @@ int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len)
unsigned int i;
unsigned char buf[EVP_MAX_MD_SIZE];
- if(!ctx->key_init)
+ if (!ctx->key_init)
goto err;
if (!EVP_DigestFinal_ex(&ctx->md_ctx, buf, &i))
@@ -182,7 +182,7 @@ int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx)
if (!EVP_MD_CTX_copy_ex(&dctx->md_ctx, &sctx->md_ctx))
goto err;
dctx->key_init = sctx->key_init;
- if(sctx->key_init) {
+ if (sctx->key_init) {
memcpy(dctx->key, sctx->key, HMAC_MAX_MD_CBLOCK);
dctx->key_length = sctx->key_length;
}
diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c
index 48ab1a7779..fa8709fa83 100644
--- a/crypto/objects/o_names.c
+++ b/crypto/objects/o_names.c
@@ -312,7 +312,7 @@ void OBJ_NAME_do_all_sorted(int type,
d.names =
OPENSSL_malloc(lh_OBJ_NAME_num_items(names_lh) * sizeof *d.names);
/* Really should return an error if !d.names...but its a void function! */
- if(d.names) {
+ if (d.names) {
d.n = 0;
OBJ_NAME_do_all(type, do_all_sorted_fn, &d);
diff --git a/crypto/rand/rand_os2.c b/crypto/rand/rand_os2.c
index 02148d5bf9..706ab1e817 100644
--- a/crypto/rand/rand_os2.c
+++ b/crypto/rand/rand_os2.c
@@ -149,7 +149,7 @@ int RAND_poll(void)
if (DosQuerySysState) {
char *buffer = OPENSSL_malloc(256 * 1024);
- if(!buffer)
+ if (!buffer)
return 0;
if (DosQuerySysState(0x1F, 0, 0, 0, buffer, 256 * 1024) == 0) {
diff --git a/crypto/threads/th-lock.c b/crypto/threads/th-lock.c
index 7b303b281a..6732dd76ed 100644
--- a/crypto/threads/th-lock.c
+++ b/crypto/threads/th-lock.c
@@ -117,7 +117,7 @@ void CRYPTO_thread_setup(void)
int i;
lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(HANDLE));
- if(!lock_cs) {
+ if (!lock_cs) {
/* Nothing we can do about this...void function! */
return;
}
@@ -172,7 +172,7 @@ void CRYPTO_thread_setup(void)
# else
lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(rwlock_t));
# endif
- if(!lock_cs) {
+ if (!lock_cs) {
/* Nothing we can do about this...void function! */
return;
}
@@ -248,7 +248,7 @@ void CRYPTO_thread_setup(void)
char filename[20];
lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(usema_t *));
- if(!lock_cs) {
+ if (!lock_cs) {
/* Nothing we can do about this...void function! */
return;
}
@@ -316,11 +316,11 @@ void CRYPTO_thread_setup(void)
lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t));
lock_count = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long));
- if(!lock_cs || !lock_count) {
+ if (!lock_cs || !lock_count) {
/* Nothing we can do about this...void function! */
- if(lock_cs)
+ if (lock_cs)
OPENSSL_free(lock_cs);
- if(lock_count)
+ if (lock_count)
OPENSSL_free(lock_count);
return;
}
diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c
index 66d486f97f..8147ea598e 100644
--- a/crypto/x509v3/v3_cpols.c
+++ b/crypto/x509v3/v3_cpols.c
@@ -230,11 +230,11 @@ static POLICYINFO *policy_section(X509V3_CTX *ctx,
goto merr;
if (!sk_POLICYQUALINFO_push(pol->qualifiers, qual))
goto merr;
- if(!(qual->pqualid = OBJ_nid2obj(NID_id_qt_cps))) {
+ if (!(qual->pqualid = OBJ_nid2obj(NID_id_qt_cps))) {
X509V3err(X509V3_F_POLICY_SECTION, ERR_R_INTERNAL_ERROR);
goto err;
}
- if(!(qual->d.cpsuri = ASN1_IA5STRING_new()))
+ if (!(qual->d.cpsuri = ASN1_IA5STRING_new()))
goto merr;
if (!ASN1_STRING_set(qual->d.cpsuri, cnf->value,
strlen(cnf->value)))
@@ -294,7 +294,7 @@ static POLICYQUALINFO *notice_section(X509V3_CTX *ctx,
POLICYQUALINFO *qual;
if (!(qual = POLICYQUALINFO_new()))
goto merr;
- if(!(qual->pqualid = OBJ_nid2obj(NID_id_qt_unotice))) {
+ if (!(qual->pqualid = OBJ_nid2obj(NID_id_qt_unotice))) {
X509V3err(X509V3_F_NOTICE_SECTION, ERR_R_INTERNAL_ERROR);
goto err;
}
@@ -304,7 +304,7 @@ static POLICYQUALINFO *notice_section(X509V3_CTX *ctx,
for (i = 0; i < sk_CONF_VALUE_num(unot); i++) {
cnf = sk_CONF_VALUE_value(unot, i);
if (!strcmp(cnf->name, "explicitText")) {
- if(!(not->exptext = ASN1_VISIBLESTRING_new()))
+ if (!(not->exptext = ASN1_VISIBLESTRING_new()))
goto merr;
if (!ASN1_STRING_set(not->exptext, cnf->value,
strlen(cnf->value)))