Re: [PATCH]: 2.5.1pre9 change several if (x) BUG to BUG_ON(x)

From: Alan Cox (
Date: Sun Jan 06 2002 - 09:48:13 EST

> Yes, only that, even a trained monkey is able to make this patch, but i think
> is a good way to make people confortable with BUG_ON

Your patch looks wrong (ook ook! 8)) - if you build without BUG enabled you
don't make various function calls with your change. BUG_ON has the C nasty
assert() does that makes it a horrible horrible idea and its unfortunate
it got put in.


ends up not causing function to be called when not debugging

The classic C mess people get into is similar with things like

        assert(x++ == 4);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jan 07 2002 - 21:00:31 EST