Re: [RFC] replace assorted ASSERT()s by something officially sanctioned
From: Michael Buesch
Date: Wed Jun 23 2004 - 14:05:12 EST
-----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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/