lkml.org 
[lkml]   [2003]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUGed to death
On Tue, Apr 15, 2003 at 02:31:34PM +0200, Jens Axboe wrote:

> If you do that, you must audit every single BUG_ON to make sure the
> expression doesn't have any side effects.
>
> BUG_ON(do_the_good_stuff());

Sure, but such a construct looks really bad anyway.
Relying on side-effects of whats essentially a debug macro
sounds very dodgy.

foo = do_the_good_stuff();
BUG_ON (foo==baz)

Would be a better way of expressing this.

Dave

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.059 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site