aboutsummaryrefslogtreecommitdiffstats
path: root/net/x25
diff options
context:
space:
mode:
authoryuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>2017-06-18 10:52:04 -0400
committerDavid S. Miller <davem@davemloft.net>2017-06-20 13:30:15 -0400
commitb952f4dff2751252db073c27c0f8a16a416a2ddc (patch)
treefda132505741ee4d859ae09f45966656ea557572 /net/x25
parentad941e693b24ad8b13c28382d323552ef6fb434b (diff)
net: manual clean code which call skb_put_[data:zero]
Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/x25')
-rw-r--r--net/x25/x25_subr.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/x25/x25_subr.c b/net/x25/x25_subr.c
index eb466ece1730..db0b1315d577 100644
--- a/net/x25/x25_subr.c
+++ b/net/x25/x25_subr.c
@@ -188,14 +188,14 @@ void x25_write_internal(struct sock *sk, int frametype)
188 *dptr++ = X25_CALL_REQUEST; 188 *dptr++ = X25_CALL_REQUEST;
189 len = x25_addr_aton(addresses, &x25->dest_addr, 189 len = x25_addr_aton(addresses, &x25->dest_addr,
190 &x25->source_addr); 190 &x25->source_addr);
191 dptr = skb_put_data(skb, addresses, len); 191 skb_put_data(skb, addresses, len);
192 len = x25_create_facilities(facilities, 192 len = x25_create_facilities(facilities,
193 &x25->facilities, 193 &x25->facilities,
194 &x25->dte_facilities, 194 &x25->dte_facilities,
195 x25->neighbour->global_facil_mask); 195 x25->neighbour->global_facil_mask);
196 dptr = skb_put_data(skb, facilities, len); 196 skb_put_data(skb, facilities, len);
197 dptr = skb_put_data(skb, x25->calluserdata.cuddata, 197 skb_put_data(skb, x25->calluserdata.cuddata,
198 x25->calluserdata.cudlength); 198 x25->calluserdata.cudlength);
199 x25->calluserdata.cudlength = 0; 199 x25->calluserdata.cudlength = 0;
200 break; 200 break;
201 201
@@ -207,15 +207,15 @@ void x25_write_internal(struct sock *sk, int frametype)
207 &x25->facilities, 207 &x25->facilities,
208 &x25->dte_facilities, 208 &x25->dte_facilities,
209 x25->vc_facil_mask); 209 x25->vc_facil_mask);
210 dptr = skb_put_data(skb, facilities, len); 210 skb_put_data(skb, facilities, len);
211 211
212 /* fast select with no restriction on response 212 /* fast select with no restriction on response
213 allows call user data. Userland must 213 allows call user data. Userland must
214 ensure it is ours and not theirs */ 214 ensure it is ours and not theirs */
215 if(x25->facilities.reverse & 0x80) { 215 if(x25->facilities.reverse & 0x80) {
216 dptr = skb_put_data(skb, 216 skb_put_data(skb,
217 x25->calluserdata.cuddata, 217 x25->calluserdata.cuddata,
218 x25->calluserdata.cudlength); 218 x25->calluserdata.cudlength);
219 } 219 }
220 x25->calluserdata.cudlength = 0; 220 x25->calluserdata.cudlength = 0;
221 break; 221 break;