summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-07-30 04:07:46 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-08-01 23:22:41 +0200
commit7490aec2cfd149581303fbdbb3c542e2fa131cd1 (patch)
tree43e2f7c3da209fcffad26c99965ba3eb4a4d7d33 /src
parent150138bd01a241304a93dbd1f731de2ad4316fe6 (diff)
receive: single line if style
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r--src/receive.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/receive.c b/src/receive.c
index 867703c..9085d71 100644
--- a/src/receive.c
+++ b/src/receive.c
@@ -222,9 +222,8 @@ void packet_consume_data_done(struct sk_buff *skb, struct wireguard_peer *peer,
} else
goto dishonest_packet_type;
- if (unlikely(len > skb->len)) {
+ if (unlikely(len > skb->len))
goto dishonest_packet_size;
- }
if (len < skb->len && unlikely(pskb_trim(skb, len)))
goto packet_processed;