summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-07-05 21:13:53 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-07-05 21:13:53 +0200
commitd62fa841bd9b5e110a9d38ef2475f104809753f1 (patch)
treeb6cfdf4278a18b96d6bb3d5626846a00b0e4cb02 /src
parent6bb01a673d1b8805580f4f1a5506319da136a279 (diff)
device: move unlikely check to if clause
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r--src/device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/device.c b/src/device.c
index ccb0af4..120f8c9 100644
--- a/src/device.c
+++ b/src/device.c
@@ -116,9 +116,9 @@ static netdev_tx_t xmit(struct sk_buff *skb, struct net_device *dev)
}
read_lock_bh(&peer->endpoint_lock);
- ret = unlikely(peer->endpoint_addr.ss_family != AF_INET && peer->endpoint_addr.ss_family != AF_INET6);
+ ret = peer->endpoint_addr.ss_family != AF_INET && peer->endpoint_addr.ss_family != AF_INET6;
read_unlock_bh(&peer->endpoint_lock);
- if (ret) {
+ if (unlikely(ret)) {
net_dbg_ratelimited("No valid endpoint has been configured or discovered for device\n");
peer_put(peer);
skb_unsendable(skb, dev);