networking: add and use skb_put_u8()
[sfrench/cifs-2.6.git] / include / linux / skbuff.h
index 46bd514e719c00885b25bdcdb928e27c59f266ef..852feacf4bbfae14b6eb4f710aa022a7953369fa 100644 (file)
@@ -1923,6 +1923,11 @@ static inline void *skb_put_data(struct sk_buff *skb, const void *data,
        return tmp;
 }
 
+static inline void skb_put_u8(struct sk_buff *skb, u8 val)
+{
+       *(u8 *)skb_put(skb, 1) = val;
+}
+
 void *skb_push(struct sk_buff *skb, unsigned int len);
 static inline void *__skb_push(struct sk_buff *skb, unsigned int len)
 {