Quoting Adrian Bunk : > > Anything you put in BUG_ON() must *NOT* have side effects. > >... > > I'd have said exactly the same some time ago, but I was convinced by > Arjan that if done correctly, a BUG_ON() with side effects is possible > with no extra cost even if you want to make BUG configurably do nothing. #if is_debugging_on # define BUG_ON(x) do { if (unlikely(x)) BUG(); } while (0) #else # define BUG_ON(x) do { if (x) { /* nothing */ } } while (0) #endif > cu > Adrian > -- Regards Michael Buesch [ http://www.tuxsoft.de.vu ]