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>
Esse commit está contido em:
@@ -925,7 +925,6 @@ static void alb_send_lp_vid(struct slave *slave, u8 mac_addr[],
|
||||
struct learning_pkt pkt;
|
||||
struct sk_buff *skb;
|
||||
int size = sizeof(struct learning_pkt);
|
||||
char *data;
|
||||
|
||||
memset(&pkt, 0, size);
|
||||
ether_addr_copy(pkt.mac_dst, mac_addr);
|
||||
@@ -936,7 +935,7 @@ static void alb_send_lp_vid(struct slave *slave, u8 mac_addr[],
|
||||
if (!skb)
|
||||
return;
|
||||
|
||||
data = skb_put_data(skb, &pkt, size);
|
||||
skb_put_data(skb, &pkt, size);
|
||||
|
||||
skb_reset_mac_header(skb);
|
||||
skb->network_header = skb->mac_header + ETH_HLEN;
|
||||
|
Referência em uma nova issue
Block a user