mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
net: manual clean code which call skb_put_[data:zero]
Signed-off-by: yuan linyu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
ad941e693b
commit
b952f4dff2
39 changed files with 93 additions and 135 deletions
|
|
@ -188,14 +188,14 @@ void x25_write_internal(struct sock *sk, int frametype)
|
|||
*dptr++ = X25_CALL_REQUEST;
|
||||
len = x25_addr_aton(addresses, &x25->dest_addr,
|
||||
&x25->source_addr);
|
||||
dptr = skb_put_data(skb, addresses, len);
|
||||
skb_put_data(skb, addresses, len);
|
||||
len = x25_create_facilities(facilities,
|
||||
&x25->facilities,
|
||||
&x25->dte_facilities,
|
||||
x25->neighbour->global_facil_mask);
|
||||
dptr = skb_put_data(skb, facilities, len);
|
||||
dptr = skb_put_data(skb, x25->calluserdata.cuddata,
|
||||
x25->calluserdata.cudlength);
|
||||
skb_put_data(skb, facilities, len);
|
||||
skb_put_data(skb, x25->calluserdata.cuddata,
|
||||
x25->calluserdata.cudlength);
|
||||
x25->calluserdata.cudlength = 0;
|
||||
break;
|
||||
|
||||
|
|
@ -207,15 +207,15 @@ void x25_write_internal(struct sock *sk, int frametype)
|
|||
&x25->facilities,
|
||||
&x25->dte_facilities,
|
||||
x25->vc_facil_mask);
|
||||
dptr = skb_put_data(skb, facilities, len);
|
||||
skb_put_data(skb, facilities, len);
|
||||
|
||||
/* fast select with no restriction on response
|
||||
allows call user data. Userland must
|
||||
ensure it is ours and not theirs */
|
||||
if(x25->facilities.reverse & 0x80) {
|
||||
dptr = skb_put_data(skb,
|
||||
x25->calluserdata.cuddata,
|
||||
x25->calluserdata.cudlength);
|
||||
skb_put_data(skb,
|
||||
x25->calluserdata.cuddata,
|
||||
x25->calluserdata.cudlength);
|
||||
}
|
||||
x25->calluserdata.cudlength = 0;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue