[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
To clearly state the intent of copying from linear sk_buffs, _offset being a overly long variant but interesting for the sake of saving some bytes. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
David S. Miller

parent
2a123b86e2
commit
d626f62b11
@@ -226,13 +226,13 @@ void __nr_transmit_reply(struct sk_buff *skb, int mine, unsigned char cmdflags)
|
||||
|
||||
dptr = skb_put(skbn, NR_NETWORK_LEN + NR_TRANSPORT_LEN);
|
||||
|
||||
memcpy(dptr, skb->data + 7, AX25_ADDR_LEN);
|
||||
skb_copy_from_linear_data_offset(skb, 7, dptr, AX25_ADDR_LEN);
|
||||
dptr[6] &= ~AX25_CBIT;
|
||||
dptr[6] &= ~AX25_EBIT;
|
||||
dptr[6] |= AX25_SSSID_SPARE;
|
||||
dptr += AX25_ADDR_LEN;
|
||||
|
||||
memcpy(dptr, skb->data + 0, AX25_ADDR_LEN);
|
||||
skb_copy_from_linear_data(skb, dptr, AX25_ADDR_LEN);
|
||||
dptr[6] &= ~AX25_CBIT;
|
||||
dptr[6] |= AX25_EBIT;
|
||||
dptr[6] |= AX25_SSSID_SPARE;
|
||||
|
Reference in New Issue
Block a user