[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1244588008.30733.94.camel@localhost.localdomain>
Date: Tue, 09 Jun 2009 18:53:27 -0400
From: Jon Masters <jonathan@...masters.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...e.hu,
rostedt@...dmis.org
Subject: Re: [RFC PATCH 1/1] smi_detector: A System Management Interrupt
detector
On Tue, 2009-06-09 at 14:56 -0700, Andrew Morton wrote:
> On Tue, 09 Jun 2009 17:50:01 -0400
> Jon Masters <jonathan@...masters.org> wrote:
>
> > > > + if (0 != err)
> > >
> > > if (err != 0)
> > >
> > > or
> > >
> > > if (err)
> > >
> > > would be more typical.
> >
> > The former runs the risk of assignment,
>
> yup, which is why gcc will warn if you do
>
> if (err = 0)
>
> If you really meant to do that, then gcc can be silenced by
> double-parenthesising. We consider this "good enough" for kernel
> purposes, so we generally don't use the `if (CONSTANT == variable)' trick.
Ah, yes, good point.
Jon.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists