> Please modify the second kassert to
>
>
> #define kassert(cond) if (cond) ;
>
> That way,
>
> kassert(var++)
>
> works the same with and without DEBUG.
>
> (I know, one shouldn't change a variable in an assert, but there is NO
> decent way to find such bugs)
Better write:
do { (void)(cond); } while(0)
then (your if can screw up other ifs).
-- 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/