Paul Mackerras <paulus@linuxcare.com.au> said:
> In looking through drivers/char/pty.c, I saw a couple of places where
> the MIN() macro is used and one of its arguments is a function call
> which could potentially return a different number each time it is
> called, particularly on SMP systems. Here is a patch to fix that.
It would be better to fix MIN in that case, so no others slip through:
#define MIN(x, y) ({typeof x x_ = x; typeof y y_ = y; x_ < y_ ? x_ : y_})
should work right for any combination of types. BTW, there are several
implementations of MIN floating around, perhaps they should be unified?
-- Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513- 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 : Sun Apr 23 2000 - 21:00:10 EST