diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-16 15:32:42 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-16 15:33:18 +0200 |
commit | 72f1b484e50e785d303bb144858646f30a6a3324 (patch) | |
tree | 070e41dceed07b4a08791b5d99e7eab0ae40015d /src | |
parent | timers: style (diff) | |
download | wireguard-monolithic-historical-72f1b484e50e785d303bb144858646f30a6a3324.tar.xz wireguard-monolithic-historical-72f1b484e50e785d303bb144858646f30a6a3324.zip |
send: no need to check for NULL since ref is valid
Diffstat (limited to 'src')
-rw-r--r-- | src/receive.c | 2 | ||||
-rw-r--r-- | src/send.c | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/receive.c b/src/receive.c index 08b2fe2..da229df 100644 --- a/src/receive.c +++ b/src/receive.c @@ -157,7 +157,7 @@ void packet_process_queued_handshake_packets(struct work_struct *work) } } -static void keep_key_fresh(struct wireguard_peer *peer) +static inline void keep_key_fresh(struct wireguard_peer *peer) { struct noise_keypair *keypair; bool send = false; @@ -55,9 +55,6 @@ void packet_queue_handshake_initiation(struct wireguard_peer *peer, bool is_retr return; peer = peer_rcu_get(peer); - if (unlikely(!peer)) - return; - /* Queues up calling packet_send_queued_handshakes(peer), where we do a peer_put(peer) after: */ if (!queue_work(peer->device->peer_wq, &peer->transmit_handshake_work)) peer_put(peer); /* If the work was already queued, we want to drop the extra reference */ |