summaryrefslogtreecommitdiffstats
path: root/crypto/des/set_key.c
diff options
context:
space:
mode:
authorKaoruToda <kunnpuu@gmail.com>2017-10-17 23:04:09 +0900
committerMatt Caswell <matt@openssl.org>2017-10-18 16:05:06 +0100
commit26a7d938c9bf932a55cb5e4e02abb48fe395c5cd (patch)
treece5b1908c181722514aa80d03026c6f42ab85972 /crypto/des/set_key.c
parent2139145b72d084a3f974a94accd7d9812de286e4 (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/set_key.c')
-rw-r--r--crypto/des/set_key.c10
1 files changed, 5 insertions, 5 deletions
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);
}