Re: [1/1] net: pegasus: remove dead coding

From: Petko Manolov
Date: Wed May 18 2016 - 03:50:56 EST


On 16-05-18 09:15:40, Oliver Neukum wrote:
> On Tue, 2016-05-17 at 23:30 -0700, Guenter Roeck wrote:
> > On Wed, May 18, 2016 at 02:13:30AM +0200, Heinrich Schuchardt wrote:
> > > (!count || count < 4) is always true.
> >
> > Even if count >= 4 ?
>
> The check for !count is redundant, though. Gcc, however,
> will surely simplify the expression.

Yep, gcc-6 generates this code:

...
cmp $0x3,%edx
jle b9 <read_bulk_callback+0x69>
...

Which does not invalidate your statement that "!count" is redundant. :)


Petko