Skip to contentSkip to conversation

: tcp: Use skb_queue_is_last() instead of by-hand version.

PATCH New David Miller 1 participant 1 message Sep 23, 2008

Subsystems (3)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 1/1 : tcp: Use skb_queue_is_last() instead of by-hand version.

tcp: Use skb_queue_is_last() instead of by-hand version.

---
 include/net/tcp.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
include/net/tcp.h +3 -3
index f857c3e..5c5327e 100644
@@ -1284,10 +1284,10 @@ static inline void tcp_unlink_write_queue(struct sk_buff *skb, struct sock *sk)
 	__skb_unlink(skb, &sk->sk_write_queue);
 }
 
-static inline int tcp_skb_is_last(const struct sock *sk,
-				  const struct sk_buff *skb)
+static inline bool tcp_skb_is_last(const struct sock *sk,
+				   const struct sk_buff *skb)
 {
-	return skb->next == (struct sk_buff *)&sk->sk_write_queue;
+	return skb_queue_is_last(&sk->sk_write_queue, skb);
 }
 
 static inline int tcp_write_queue_empty(struct sock *sk)
Signature · 1 line
1.5.6.5