aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2014-01-07 17:23:44 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-07 18:34:00 -0500
commitfd44b93cb5eee218231f6ce5883df937b3b9c3eb (patch)
tree351f82fcc93a0d998d178b947c039289e0735269
parentbe7928d20bab8517a0e38db2418394e8b2fd6a8e (diff)
net: skbuff: const-ify casts in skb_queue_* functions
We should const-ify comparisons on skb_queue_* inline helper functions as their parameters are const as well, so lets not drop that. Suggested-by: Brad Spengler <spender@grsecurity.net> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/skbuff.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 956e11a168d8..d97f2d07d02b 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -827,7 +827,7 @@ static inline struct skb_shared_hwtstamps *skb_hwtstamps(struct sk_buff *skb)
827 */ 827 */
828static inline int skb_queue_empty(const struct sk_buff_head *list) 828static inline int skb_queue_empty(const struct sk_buff_head *list)
829{ 829{
830 return list->next == (struct sk_buff *)list; 830 return list->next == (const struct sk_buff *) list;
831} 831}
832 832
833/** 833/**
@@ -840,7 +840,7 @@ static inline int skb_queue_empty(const struct sk_buff_head *list)
840static inline bool skb_queue_is_last(const struct sk_buff_head *list, 840static inline bool skb_queue_is_last(const struct sk_buff_head *list,
841 const struct sk_buff *skb) 841 const struct sk_buff *skb)
842{ 842{
843 return skb->next == (struct sk_buff *)list; 843 return skb->next == (const struct sk_buff *) list;
844} 844}
845 845
846/** 846/**
@@ -853,7 +853,7 @@ static inline bool skb_queue_is_last(const struct sk_buff_head *list,
853static inline bool skb_queue_is_first(const struct sk_buff_head *list, 853static inline bool skb_queue_is_first(const struct sk_buff_head *list,
854 const struct sk_buff *skb) 854 const struct sk_buff *skb)
855{ 855{
856 return skb->prev == (struct sk_buff *)list; 856 return skb->prev == (const struct sk_buff *) list;
857} 857}
858 858
859/** 859/**