lkml.org 
[lkml]   [2004]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] replace assorted ASSERT()s by something officially sanctioned
Date
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> +#ifdef DEBUG
> +#define DBUG_ON(condition) BUG_ON(condition)
> +#else
> +#define DBUG_ON(condition)
> +#endif

As condition is lost when DEBUG is not defined, what about that:

#else
# define DBUG_ON(condition) do { if (condition) { /* nothing */ } } while (0)
#endif

letting the compiler optimize away all the stuff and removing
the risk of loosing an expression in ( ).

- --
Regards Michael Buesch [ http://www.tuxsoft.de.vu ]


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA2dPAFGK1OIvVOP4RAuPrAJ9juu+dZLSt1QjsMQeko82n9OgLqgCeN0TQ
Fec6PgrBWBRwLxl6U65QVmw=
=l7+o
-----END PGP SIGNATURE-----
-
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 14:04    [W:0.068 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site