mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
UPSTREAM: wireguard: noise: do not assign initiation time in if condition
Fixes an error condition reported by checkpatch.pl which caused by assigning a variable in an if condition in wg_noise_handshake_consume_ initiation(). Signed-off-by: Frank Werner-Krippendorf <mail@hb9fxq.ch> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 558b353c9c2a717509f291c066c6bd8f5f5e21be) Bug: 152722841 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I3b62d12d179b3093741b3e943b7802e728a7fc7d
This commit is contained in:
parent
82c2f4699a
commit
1ee42be9ee
1 changed files with 2 additions and 2 deletions
|
|
@ -650,8 +650,8 @@ wg_noise_handshake_consume_initiation(struct message_handshake_initiation *src,
|
|||
memcpy(handshake->hash, hash, NOISE_HASH_LEN);
|
||||
memcpy(handshake->chaining_key, chaining_key, NOISE_HASH_LEN);
|
||||
handshake->remote_index = src->sender_index;
|
||||
if ((s64)(handshake->last_initiation_consumption -
|
||||
(initiation_consumption = ktime_get_coarse_boottime_ns())) < 0)
|
||||
initiation_consumption = ktime_get_coarse_boottime_ns();
|
||||
if ((s64)(handshake->last_initiation_consumption - initiation_consumption) < 0)
|
||||
handshake->last_initiation_consumption = initiation_consumption;
|
||||
handshake->state = HANDSHAKE_CONSUMED_INITIATION;
|
||||
up_write(&handshake->lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue