Re: [PATCH] i40evf: remove redundant array comparisons to 0 checks

2018-02-18 Thread Colin Ian King
On 18/02/18 16:31, Joe Perches wrote: > On Sun, 2018-02-18 at 16:58 +0200, Andy Shevchenko wrote: >> On Fri, Feb 16, 2018 at 6:53 PM, Colin Ian King >> wrote: >>> On 16/02/18 16:51, Andy Shevchenko wrote: On Thu, Feb 15, 2018 at 9:42 PM, Colin King wrote: > +

Re: [PATCH] i40evf: remove redundant array comparisons to 0 checks

2018-02-18 Thread Joe Perches
On Sun, 2018-02-18 at 16:58 +0200, Andy Shevchenko wrote: > On Fri, Feb 16, 2018 at 6:53 PM, Colin Ian King > wrote: > > On 16/02/18 16:51, Andy Shevchenko wrote: > > > On Thu, Feb 15, 2018 at 9:42 PM, Colin King > > > wrote: > > > > + filter->f.mask.tcp_spec.dst_ip[i] |= >

Re: [PATCH] i40evf: remove redundant array comparisons to 0 checks

2018-02-18 Thread Andy Shevchenko
On Fri, Feb 16, 2018 at 6:53 PM, Colin Ian King wrote: > On 16/02/18 16:51, Andy Shevchenko wrote: >> On Thu, Feb 15, 2018 at 9:42 PM, Colin King wrote: >>> + filter->f.mask.tcp_spec.dst_ip[i] |= >>> >>> cpu_to_be32(0

Re: [PATCH] i40evf: remove redundant array comparisons to 0 checks

2018-02-16 Thread Colin Ian King
On 16/02/18 16:51, Andy Shevchenko wrote: > On Thu, Feb 15, 2018 at 9:42 PM, Colin King wrote: >> From: Colin Ian King >> >> The checks to see if key->dst.s6_addr and key->src.s6_addr are null >> pointers are redundant because these are constant size arrays and >> so the checks always return true

Re: [PATCH] i40evf: remove redundant array comparisons to 0 checks

2018-02-16 Thread Andy Shevchenko
On Thu, Feb 15, 2018 at 9:42 PM, Colin King wrote: > From: Colin Ian King > > The checks to see if key->dst.s6_addr and key->src.s6_addr are null > pointers are redundant because these are constant size arrays and > so the checks always return true. Fix this by removing the redundant > checks.

[PATCH] i40evf: remove redundant array comparisons to 0 checks

2018-02-15 Thread Colin King
From: Colin Ian King The checks to see if key->dst.s6_addr and key->src.s6_addr are null pointers are redundant because these are constant size arrays and so the checks always return true. Fix this by removing the redundant checks. Detected by CoverityScan, CID#1465279 ("Array compared to 0")