aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2016-07-28 21:15:52 +0200
committerRichard Levitte <levitte@openssl.org>2016-08-02 09:59:23 +0200
commit700b814549c8c158c82466116cfc545b00f647c3 (patch)
tree26d0879de134e62852d75a0bb41535c2a80a99eb /crypto
parentcb926df2fa42bd1e396a600ff6212ee4f4e04118 (diff)
downloadopenssl-700b814549c8c158c82466116cfc545b00f647c3.tar.gz
Fix some style issues...
extra spacing and 80 cols Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1366)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bio/bio_cb.c2
-rw-r--r--crypto/bn/bn_lib.c4
-rw-r--r--crypto/ct/ct_sct.c2
-rw-r--r--crypto/ec/ec_key.c2
-rw-r--r--crypto/engine/eng_ctrl.c16
-rw-r--r--crypto/evp/e_chacha20_poly1305.c8
-rw-r--r--crypto/mem_clr.c2
-rw-r--r--crypto/ppccap.c4
8 files changed, 20 insertions, 20 deletions
diff --git a/crypto/bio/bio_cb.c b/crypto/bio/bio_cb.c
index 860208be3b..69ea3d067e 100644
--- a/crypto/bio/bio_cb.c
+++ b/crypto/bio/bio_cb.c
@@ -27,7 +27,7 @@ long BIO_debug_callback(BIO *bio, int cmd, const char *argp,
if (BIO_CB_RETURN & cmd)
r = ret;
- len = BIO_snprintf(buf,sizeof buf,"BIO[%p]: ",(void *)bio);
+ len = BIO_snprintf(buf, sizeof buf, "BIO[%p]: ", (void *)bio);
/* Ignore errors and continue printing the other information. */
if (len < 0)
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c
index b606cc9c32..0be42f8350 100644
--- a/crypto/bn/bn_lib.c
+++ b/crypto/bn/bn_lib.c
@@ -170,7 +170,7 @@ int BN_num_bits(const BIGNUM *a)
static void bn_free_d(BIGNUM *a)
{
- if (BN_get_flags(a,BN_FLG_SECURE))
+ if (BN_get_flags(a, BN_FLG_SECURE))
OPENSSL_secure_free(a->d);
else
OPENSSL_free(a->d);
@@ -259,7 +259,7 @@ static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
BNerr(BN_F_BN_EXPAND_INTERNAL, BN_R_EXPAND_ON_STATIC_BIGNUM_DATA);
return (NULL);
}
- if (BN_get_flags(b,BN_FLG_SECURE))
+ if (BN_get_flags(b, BN_FLG_SECURE))
a = A = OPENSSL_secure_zalloc(words * sizeof(*a));
else
a = A = OPENSSL_zalloc(words * sizeof(*a));
diff --git a/crypto/ct/ct_sct.c b/crypto/ct/ct_sct.c
index 1aec3e2541..08676805bd 100644
--- a/crypto/ct/ct_sct.c
+++ b/crypto/ct/ct_sct.c
@@ -117,7 +117,7 @@ void SCT_set_timestamp(SCT *sct, uint64_t timestamp)
int SCT_set_signature_nid(SCT *sct, int nid)
{
- switch (nid) {
+ switch (nid) {
case NID_sha256WithRSAEncryption:
sct->hash_alg = TLSEXT_hash_sha256;
sct->sig_alg = TLSEXT_signature_rsa;
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c
index 2d837f9c03..f1f0afb466 100644
--- a/crypto/ec/ec_key.c
+++ b/crypto/ec/ec_key.c
@@ -546,7 +546,7 @@ int EC_KEY_oct2key(EC_KEY *key, const unsigned char *buf, size_t len,
return 1;
}
-size_t EC_KEY_priv2oct(const EC_KEY *eckey,
+size_t EC_KEY_priv2oct(const EC_KEY *eckey,
unsigned char *buf, size_t len)
{
if (eckey->group == NULL || eckey->group->meth == NULL)
diff --git a/crypto/engine/eng_ctrl.c b/crypto/engine/eng_ctrl.c
index f546caf74f..7925f4fadf 100644
--- a/crypto/engine/eng_ctrl.c
+++ b/crypto/engine/eng_ctrl.c
@@ -203,14 +203,13 @@ int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
{
int num;
- if ((e == NULL) || (cmd_name == NULL)) {
+ if (e == NULL || cmd_name == NULL) {
ENGINEerr(ENGINE_F_ENGINE_CTRL_CMD, ERR_R_PASSED_NULL_PARAMETER);
return 0;
}
- if ((e->ctrl == NULL) || ((num = ENGINE_ctrl(e,
- ENGINE_CTRL_GET_CMD_FROM_NAME,
- 0, (void *)cmd_name,
- NULL)) <= 0)) {
+ if (e->ctrl == NULL
+ || (num = ENGINE_ctrl(e, ENGINE_CTRL_GET_CMD_FROM_NAME,
+ 0, (void *)cmd_name, NULL)) <= 0) {
/*
* If the command didn't *have* to be supported, we fake success.
* This allows certain settings to be specified for multiple ENGINEs
@@ -242,12 +241,11 @@ int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
long l;
char *ptr;
- if ((e == NULL) || (cmd_name == NULL)) {
- ENGINEerr(ENGINE_F_ENGINE_CTRL_CMD_STRING,
- ERR_R_PASSED_NULL_PARAMETER);
+ if (e == NULL || cmd_name == NULL) {
+ ENGINEerr(ENGINE_F_ENGINE_CTRL_CMD_STRING, ERR_R_PASSED_NULL_PARAMETER);
return 0;
}
- if (e->ctrl == NULL
+ if (e->ctrl == NULL
|| (num = ENGINE_ctrl(e, ENGINE_CTRL_GET_CMD_FROM_NAME,
0, (void *)cmd_name, NULL)) <= 0) {
/*
diff --git a/crypto/evp/e_chacha20_poly1305.c b/crypto/evp/e_chacha20_poly1305.c
index 26fefd9781..cf4097ba5d 100644
--- a/crypto/evp/e_chacha20_poly1305.c
+++ b/crypto/evp/e_chacha20_poly1305.c
@@ -345,9 +345,11 @@ static int chacha20_poly1305_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg,
case EVP_CTRL_COPY:
if (actx) {
- if ((((EVP_CIPHER_CTX *)ptr)->cipher_data =
- OPENSSL_memdup(actx,sizeof(*actx) + Poly1305_ctx_size()))
- == NULL) {
+ EVP_CIPHER_CTX *dst = (EVP_CIPHER_CTX *)ptr;
+
+ dst->cipher_data =
+ OPENSSL_memdup(actx, sizeof(*actx) + Poly1305_ctx_size());
+ if (dst->cipher_data == NULL) {
EVPerr(EVP_F_CHACHA20_POLY1305_CTRL, EVP_R_COPY_ERROR);
return 0;
}
diff --git a/crypto/mem_clr.c b/crypto/mem_clr.c
index a1a4f93009..35bfb74eae 100644
--- a/crypto/mem_clr.c
+++ b/crypto/mem_clr.c
@@ -15,7 +15,7 @@
* the pointer and can't assume that it points to any function in
* particular (such as memset, which it then might further "optimize")
*/
-typedef void *(*memset_t)(void *,int,size_t);
+typedef void *(*memset_t)(void *, int, size_t);
static volatile memset_t memset_func = memset;
diff --git a/crypto/ppccap.c b/crypto/ppccap.c
index 712ee799d6..ef38b172d9 100644
--- a/crypto/ppccap.c
+++ b/crypto/ppccap.c
@@ -119,11 +119,11 @@ void poly1305_emit_fpu(void *ctx, unsigned char mac[16],
int poly1305_init(void *ctx, const unsigned char key[16], void *func[2])
{
if (sizeof(size_t) == 4 && (OPENSSL_ppccap_P & PPC_FPU)) {
- poly1305_init_fpu(ctx,key);
+ poly1305_init_fpu(ctx, key);
func[0] = poly1305_blocks_fpu;
func[1] = poly1305_emit_fpu;
} else {
- poly1305_init_int(ctx,key);
+ poly1305_init_int(ctx, key);
func[0] = poly1305_blocks;
func[1] = poly1305_emit;
}