Re: linux-2.4.0-test8-pre5

From: Vojtech Pavlik (vojtech@suse.cz)
Date: Mon Sep 11 2000 - 10:05:28 EST


On Wed, Sep 06, 2000 at 02:21:36PM +0200, Dan Aloni wrote:

> > Can someone explain this line from the VIA update?
> > #define FIT(v,min,max) (((v)>(max)?(max):(v))<(min)?(min):(v))
> > Barring side effects on the variables, it is equivalent to
> > #define FIT(v,min,max) ((v)<(min)?(min):(v))
> >
> > Why do I get the feeling that this was *not* the intent?
 
> Or perhaps this is a lot better:
>
> #define FIT(v,min,max) ((v)>(max)?(max):((v)<(min)?(min):(v)))

Thanks for spotting the misplaced braces. Fixed in my copy of the
driver, and I'll send a patch to Linus soon, along with a couple more
enhancements to the driver (better via82c596b detection).

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



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:15 EST