mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
[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:
parent
2a123b86e2
commit
d626f62b11
133 changed files with 321 additions and 230 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue