[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1445602236-24130-5-git-send-email-clabbe.montjoie@gmail.com>
Date: Fri, 23 Oct 2015 14:10:29 +0200
From: LABBE Corentin <clabbe.montjoie@...il.com>
To: al.drozdov@...il.com, daniel@...earbox.net, davem@...emloft.net,
dwmw2@...radead.org, edumazet@...gle.com, eyal.birger@...il.com,
mst@...hat.com, viro@...iv.linux.org.uk, willemb@...gle.com
Cc: LABBE Corentin <clabbe.montjoie@...il.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH 04/11] net: packet: change vnet_hdr_len from int to size_t
vnet_hdr_len cannot be negative and is use in operation/function that
wait for unsigned value.
This patch set vnet_hdr_len as size_t.
Signed-off-by: LABBE Corentin <clabbe.montjoie@...il.com>
---
net/packet/af_packet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index aa4b15c..58a5c8f 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -2632,7 +2632,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)
int err, reserve = 0;
struct virtio_net_hdr vnet_hdr = { 0 };
int offset = 0;
- int vnet_hdr_len;
+ size_t vnet_hdr_len;
struct packet_sock *po = pkt_sk(sk);
unsigned short gso_type = 0;
int hlen, tlen;
@@ -3106,7 +3106,7 @@ static int packet_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
struct sock *sk = sock->sk;
struct sk_buff *skb;
int copied, err;
- int vnet_hdr_len = 0;
+ size_t vnet_hdr_len = 0;
unsigned int origlen = 0;
err = -EINVAL;
--
2.4.10
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists