aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/noise.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-10-08 03:54:28 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-08 18:51:34 +0200
commit780a5974d0256eed1e03a096b43f066043f8eb15 (patch)
tree3ba7923f145fd27706c11f956b1e485fd7dca5d6 /src/noise.c
parentglobal: rename struct wireguard_ to struct wg_ (diff)
downloadwireguard-monolithic-historical-780a5974d0256eed1e03a096b43f066043f8eb15.tar.xz
wireguard-monolithic-historical-780a5974d0256eed1e03a096b43f066043f8eb15.zip
global: more nits
Diffstat (limited to 'src/noise.c')
-rw-r--r--src/noise.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/noise.c b/src/noise.c
index 00310c2..0de09fb 100644
--- a/src/noise.c
+++ b/src/noise.c
@@ -206,8 +206,8 @@ static void add_new_keypair(struct noise_keypairs *keypairs,
next_keypair);
wg_noise_keypair_put(current_keypair, true);
} else /* If there wasn't an existing next keypair, we replace
- * the previous with the current one.
- */
+ * the previous with the current one.
+ */
rcu_assign_pointer(keypairs->previous_keypair,
current_keypair);
/* At this point we can get rid of the old previous keypair, and
@@ -292,7 +292,8 @@ static void kdf(u8 *first_dst, u8 *second_dst, u8 *third_dst, const u8 *data,
u8 secret[BLAKE2S_HASH_SIZE];
WARN_ON(IS_ENABLED(DEBUG) &&
- (first_len > BLAKE2S_HASH_SIZE || second_len > BLAKE2S_HASH_SIZE ||
+ (first_len > BLAKE2S_HASH_SIZE ||
+ second_len > BLAKE2S_HASH_SIZE ||
third_len > BLAKE2S_HASH_SIZE ||
((second_len || second_dst || third_len || third_dst) &&
(!first_len || !first_dst)) ||