From: Jesse Gross Date: Thu, 15 Jul 2010 02:46:23 +0000 (-0700) Subject: datapath: Make checksum offsets unsigned. X-Git-Tag: v1.1.0pre1~180 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1336993ca480cf647dc0f87c06ac51ec4175a361;p=sliver-openvswitch.git datapath: Make checksum offsets unsigned. 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. --- diff --git a/datapath/datapath.c b/datapath/datapath.c index 8833bc149..2681fed72 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -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);