datapath: Make checksum offsets unsigned.
authorJesse Gross <jesse@nicira.com>
Thu, 15 Jul 2010 02:46:23 +0000 (19:46 -0700)
committerJesse Gross <jesse@nicira.com>
Thu, 15 Jul 2010 22:09:08 +0000 (15:09 -0700)
The offsets for checksum offsets should always be positive so make
that explicit by using unsigned ints.  This helps bug checks that
test if the offsets are greater than their upper limits.

datapath/datapath.c

index 8833bc1..2681fed 100644 (file)
@@ -2193,7 +2193,7 @@ success:
        if (skb->ip_summed == CHECKSUM_PARTIAL) {
                if (copy_bytes == skb->len) {
                        __wsum csum = 0;
-                       int csum_start, csum_offset;
+                       unsigned int csum_start, csum_offset;
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
                        csum_start = skb->csum_start - skb_headroom(skb);