Skip to contentSkip to conversation

skbuff: skb_store_bits const is backwards

PATCH In review Stephen Hemminger 2 participants 2 messages Apr 20, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 skbuff: skb_store_bits const is backwards

Getting warnings becuase skb_store_bits has skb as constant, but the function overwrites it. Looks like const was on the wrong side.

---
 include/linux/skbuff.h |    4 ++--
 net/core/skbuff.c      |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
include/linux/skbuff.h +2 -2
@@ -1491,8 +1491,8 @@ extern __wsum	       skb_checksum(const 
 				    int len, __wsum csum);
 extern int	       skb_copy_bits(const struct sk_buff *skb, int offset,
 				     void *to, int len);
-extern int	       skb_store_bits(const struct sk_buff *skb, int offset,
-				      void *from, int len);
+extern int	       skb_store_bits(struct sk_buff *skb, int offset,
+				      const void *from, int len);
 extern __wsum	       skb_copy_and_csum_bits(const struct sk_buff *skb,
 					      int offset, u8 *to, int len,
 					      __wsum csum);
net/core/skbuff.c +1 -1
@@ -1188,7 +1188,7 @@ fault:
  *	traversing fragment lists and such.
  */
 
-int skb_store_bits(const struct sk_buff *skb, int offset, void *from, int len)
+int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len)
 {
 	int i, copy;
 	int start = skb_headlen(skb);