Re: Kernel bugs found using inspect tool

From: Peter T. Breuer (ptb@it.uc3m.es)
Date: Wed Feb 23 2000 - 07:39:59 EST


"A month of sundays ago Tim Waugh wrote:"
> On Wed, 23 Feb 2000 almesber@lrc.di.epfl.ch wrote:
>
> > > drivers/atm/eni.c: comparison takes precedence over assignment near line
> > > 1041
> > > if (!(aal5 = vcc->qos.aal == ATM_AAL5))
> > No problem here.
>
> If aal5 really is supposed to be a truth value (as the use of ! suggests),
> it would be really nice if someone would put in some parentheses.

It would be even nicer if someone wrote

        aal5 = (vcc->qos.aal == ATM_AAL5);
         if (!aal5) { ...

or even used a switch, since it's that kind of thing here. Maybe it's
just me, but this routine has if(aal5) all the way through, and should
probably be split into two.
  

Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:33 EST