“90687bae1c48cc80d9217fa541bd5b4df9463910”上不存在“source/libs/stream/inc/streamInt.h”
提交 18d07000 编写于 作者: E Eric Dumazet 提交者: David S. Miller

net: skb_peek()/skb_peek_tail() cleanups

remove useless casts and rename variables for less confusion.
Signed-off-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e4cbb02a
...@@ -883,10 +883,11 @@ static inline struct sk_buff *skb_unshare(struct sk_buff *skb, ...@@ -883,10 +883,11 @@ static inline struct sk_buff *skb_unshare(struct sk_buff *skb,
*/ */
static inline struct sk_buff *skb_peek(const struct sk_buff_head *list_) static inline struct sk_buff *skb_peek(const struct sk_buff_head *list_)
{ {
struct sk_buff *list = ((const struct sk_buff *)list_)->next; struct sk_buff *skb = list_->next;
if (list == (struct sk_buff *)list_)
list = NULL; if (skb == (struct sk_buff *)list_)
return list; skb = NULL;
return skb;
} }
/** /**
...@@ -902,6 +903,7 @@ static inline struct sk_buff *skb_peek_next(struct sk_buff *skb, ...@@ -902,6 +903,7 @@ static inline struct sk_buff *skb_peek_next(struct sk_buff *skb,
const struct sk_buff_head *list_) const struct sk_buff_head *list_)
{ {
struct sk_buff *next = skb->next; struct sk_buff *next = skb->next;
if (next == (struct sk_buff *)list_) if (next == (struct sk_buff *)list_)
next = NULL; next = NULL;
return next; return next;
...@@ -922,10 +924,12 @@ static inline struct sk_buff *skb_peek_next(struct sk_buff *skb, ...@@ -922,10 +924,12 @@ static inline struct sk_buff *skb_peek_next(struct sk_buff *skb,
*/ */
static inline struct sk_buff *skb_peek_tail(const struct sk_buff_head *list_) static inline struct sk_buff *skb_peek_tail(const struct sk_buff_head *list_)
{ {
struct sk_buff *list = ((const struct sk_buff *)list_)->prev; struct sk_buff *skb = list_->prev;
if (list == (struct sk_buff *)list_)
list = NULL; if (skb == (struct sk_buff *)list_)
return list; skb = NULL;
return skb;
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册