datapath: Make 'length' local variable unsigned, for consistency.
authorBen Pfaff <blp@nicira.com>
Fri, 9 Jan 2009 00:40:16 +0000 (16:40 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 13 Jan 2009 01:00:28 +0000 (17:00 -0800)
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.

datapath/datapath.c

index e5ed9df1b405cf3199396d731d2b14a08c707f73..1043742e23d2094b4c447609f8a82a9870b6140d 100644 (file)
@@ -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;