[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DB02265B3@AcuExch.aculab.com>
Date: Wed, 23 Nov 2016 12:49:41 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Alexey Dobriyan' <adobriyan@...il.com>,
"davem@...emloft.net" <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH] net: fix bogus cast in skb_pagelen() and use unsigned
variables
From: Alexey Dobriyan
> Sent: 19 November 2016 01:08
...
> - for (i = (int)skb_shinfo(skb)->nr_frags - 1; i >= 0; i--)
> + for (i = skb_shinfo(skb)->nr_frags - 1; (int)i >= 0; i--)
> len += skb_frag_size(&skb_shinfo(skb)->frags[i]);
Think I'd use:
for (i = skb_shinfo(skb)->nr_frags; i-- != 0; )
David
Powered by blists - more mailing lists