From: Ben Pfaff Date: Fri, 9 Jan 2009 00:40:16 +0000 (-0800) Subject: datapath: Make 'length' local variable unsigned, for consistency. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b93bb5900d8d71a93101c7e75793d10dcc57eb3;p=openvswitch datapath: Make 'length' local variable unsigned, for consistency. This is a style issue, not a bug, if you chase down what the function and the caller are doing. Found by Chris Eagle via Fortify. --- diff --git a/datapath/datapath.c b/datapath/datapath.c index e5ed9df1..1043742e 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -602,7 +602,7 @@ static void dp_frame_hook(struct sk_buff *skb) static inline unsigned packet_length(const struct sk_buff *skb) { - int length = skb->len - ETH_HLEN; + unsigned length = skb->len - ETH_HLEN; if (skb->protocol == htons(ETH_P_8021Q)) length -= VLAN_HLEN; return length;