From c054f431878773ddf6366d50aedebafafbc9759b Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Fri, 16 Jun 2017 01:04:41 -0500 Subject: send: use skb_queue_empty where appropriate Signed-off-by: Samuel Holland --- src/send.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/send.c b/src/send.c index 5bc2dd6..5b31541 100644 --- a/src/send.c +++ b/src/send.c @@ -109,7 +109,7 @@ static inline void keep_key_fresh(struct wireguard_peer *peer) void packet_send_keepalive(struct wireguard_peer *peer) { struct sk_buff *skb; - if (!skb_queue_len(&peer->tx_packet_queue)) { + if (skb_queue_empty(&peer->tx_packet_queue)) { skb = alloc_skb(DATA_PACKET_HEAD_ROOM + MESSAGE_MINIMUM_LENGTH, GFP_ATOMIC); if (unlikely(!skb)) return; @@ -126,7 +126,7 @@ void packet_create_data_done(struct sk_buff_head *queue, struct wireguard_peer * struct sk_buff *skb, *tmp; bool is_keepalive, data_sent = false; - if (unlikely(!skb_queue_len(queue))) + if (unlikely(skb_queue_empty(queue))) return; timers_any_authenticated_packet_traversal(peer); @@ -157,7 +157,7 @@ void packet_send_queue(struct wireguard_peer *peer) skb_queue_splice_init(&peer->tx_packet_queue, &queue); spin_unlock_bh(&peer->tx_packet_queue.lock); - if (unlikely(!skb_queue_len(&queue))) + if (unlikely(skb_queue_empty(&queue))) return; /* We submit it for encryption and sending. */ -- cgit v1.2.3-59-g8ed1b