diff options
author | KaoruToda <kunnpuu@gmail.com> | 2017-10-17 23:04:09 +0900 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-10-18 16:05:06 +0100 |
commit | 26a7d938c9bf932a55cb5e4e02abb48fe395c5cd (patch) | |
tree | ce5b1908c181722514aa80d03026c6f42ab85972 /crypto/des | |
parent | 2139145b72d084a3f974a94accd7d9812de286e4 (diff) |
Remove parentheses of return.
Since return is inconsistent, I removed unnecessary parentheses and
unified them.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4541)
Diffstat (limited to 'crypto/des')
-rw-r--r-- | crypto/des/cbc_cksm.c | 2 | ||||
-rw-r--r-- | crypto/des/fcrypt.c | 4 | ||||
-rw-r--r-- | crypto/des/qud_cksm.c | 2 | ||||
-rw-r--r-- | crypto/des/rand_key.c | 2 | ||||
-rw-r--r-- | crypto/des/set_key.c | 10 |
5 files changed, 10 insertions, 10 deletions
diff --git a/crypto/des/cbc_cksm.c b/crypto/des/cbc_cksm.c index ef715264e1..5a1f72f82d 100644 --- a/crypto/des/cbc_cksm.c +++ b/crypto/des/cbc_cksm.c @@ -49,5 +49,5 @@ DES_LONG DES_cbc_cksum(const unsigned char *in, DES_cblock *output, | ((tout1 >> 8L) & 0x0000FF00) | ((tout1 << 8L) & 0x00FF0000) | ((tout1 << 24L) & 0xFF000000); - return (tout1); + return tout1; } diff --git a/crypto/des/fcrypt.c b/crypto/des/fcrypt.c index eeb278ce11..526a9edfb0 100644 --- a/crypto/des/fcrypt.c +++ b/crypto/des/fcrypt.c @@ -60,7 +60,7 @@ char *DES_crypt(const char *buf, const char *salt) static char buff[14]; #ifndef CHARSET_EBCDIC - return (DES_fcrypt(buf, salt, buff)); + return DES_fcrypt(buf, salt, buff); #else char e_salt[2 + 1]; char e_buf[32 + 1]; /* replace 32 by 8 ? */ @@ -145,5 +145,5 @@ char *DES_fcrypt(const char *buf, const char *salt, char *ret) ret[i] = cov_2char[c]; } ret[13] = '\0'; - return (ret); + return ret; } diff --git a/crypto/des/qud_cksm.c b/crypto/des/qud_cksm.c index d9c6e4a3f0..81e6be8226 100644 --- a/crypto/des/qud_cksm.c +++ b/crypto/des/qud_cksm.c @@ -72,5 +72,5 @@ DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[], *lp++ = z1; } } - return (z0); + return z0; } diff --git a/crypto/des/rand_key.c b/crypto/des/rand_key.c index 3921aaf005..09d7e4cf14 100644 --- a/crypto/des/rand_key.c +++ b/crypto/des/rand_key.c @@ -14,7 +14,7 @@ int DES_random_key(DES_cblock *ret) { do { if (RAND_bytes((unsigned char *)ret, sizeof(DES_cblock)) != 1) - return (0); + return 0; } while (DES_is_weak_key(ret)); DES_set_odd_parity(ret); return 1; diff --git a/crypto/des/set_key.c b/crypto/des/set_key.c index 135665b046..0a57f31f1e 100644 --- a/crypto/des/set_key.c +++ b/crypto/des/set_key.c @@ -64,7 +64,7 @@ int DES_check_key_parity(const_DES_cblock *key) for (i = 0; i < DES_KEY_SZ; i++) { if ((*key)[i] != odd_parity[(*key)[i]]) - return (0); + return 0; } return 1; } @@ -106,7 +106,7 @@ int DES_is_weak_key(const_DES_cblock *key) for (i = 0; i < NUM_WEAK_KEY; i++) if (memcmp(weak_keys[i], key, sizeof(DES_cblock)) == 0) return 1; - return (0); + return 0; } /*- @@ -293,9 +293,9 @@ int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule) int DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule) { if (!DES_check_key_parity(key)) - return (-1); + return -1; if (DES_is_weak_key(key)) - return (-2); + return -2; DES_set_key_unchecked(key, schedule); return 0; } @@ -368,5 +368,5 @@ void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule) int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule) { - return (DES_set_key(key, schedule)); + return DES_set_key(key, schedule); } |