lkml.org 
[lkml]   [2000]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Kernel bugs found using inspect tool
Date
"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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.043 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site