Messages in this thread | | | Date | Thu, 22 Jan 2004 13:03:39 +1100 | From | Rusty Russell <> | Subject | Re: More cleanups for swsusp |
| |
On Wed, 21 Jan 2004 12:39:38 -0600 Matt Mackall <mpm@selenic.com> wrote:
> > > 3) BUG_ON(complex condition expression) is much less clear than: > > > > > > if (complex condition expression) > > > BUG(); > > Disagree. All BUG_ON() stuff should read like: > > /* check that impossible stuff didn't happen, move along, nothing to see */ > BUG_ON(...);
You can disagree all you like.
But Linus only allowed BUG_ON() because of the branch-prediction problem, preferring explicit "if (x) BUG()". I happen to agree with him, especially if x is a complex expression.
Rusty. -- there are those who do and those who hang on and you don't see too many doers quoting their contemporaries. -- Larry McVoy - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |