summaryrefslogtreecommitdiff
path: root/net/vmw_vsock
diff options
context:
space:
mode:
authoryuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>2017-06-18 17:52:04 +0300
committerDavid S. Miller <davem@davemloft.net>2017-06-20 20:30:15 +0300
commitb952f4dff2751252db073c27c0f8a16a416a2ddc (patch)
treefda132505741ee4d859ae09f45966656ea557572 /net/vmw_vsock
parentad941e693b24ad8b13c28382d323552ef6fb434b (diff)
downloadlinux-b952f4dff2751252db073c27c0f8a16a416a2ddc.tar.xz
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/vmw_vsock')
-rw-r--r--net/vmw_vsock/virtio_transport_common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
index 7d6ee03f2762..edba7ab97563 100644
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -90,7 +90,6 @@ out_pkt:
static struct sk_buff *virtio_transport_build_skb(void *opaque)
{
struct virtio_vsock_pkt *pkt = opaque;
- unsigned char *t_hdr, *payload;
struct af_vsockmon_hdr *hdr;
struct sk_buff *skb;
@@ -132,10 +131,10 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque)
break;
}
- t_hdr = skb_put_data(skb, &pkt->hdr, sizeof(pkt->hdr));
+ skb_put_data(skb, &pkt->hdr, sizeof(pkt->hdr));
if (pkt->len) {
- payload = skb_put_data(skb, pkt->buf, pkt->len);
+ skb_put_data(skb, pkt->buf, pkt->len);
}
return skb;