diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-08-22 18:19:12 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-08-23 23:42:33 +0200 |
commit | a6ba3ad626ccd15f9104b3143c297f39cce6e050 (patch) | |
tree | 4cfe6caba40c1d639e3a61ba78cfdf44505513f0 /include | |
parent | 4dedecf4d64ef64f7f86efeeed117be931005282 (diff) |
src: remove ifdef DEBUG pollution
Get rid of lots of ifdef DEBUG pollution in the code.
The --debug= option is useful to get feedback from users, so it should
be always there. And we really save nothing from keeping this code away
from the control plane with a compile time option. Just running
tests/shell/ before and after this patch, time shows almost no
difference.
So this patch leaves --enable-debug around to add debugging symbols in
your builds, this is left set on by default.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/utils.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/include/utils.h b/include/utils.h index 0605eeed..36919524 100644 --- a/include/utils.h +++ b/include/utils.h @@ -13,17 +13,9 @@ #define BITS_PER_BYTE 8 -#if defined(DEBUG) #define pr_debug(fmt, arg...) printf(fmt, ##arg) -#else -#define pr_debug(fmt, arg...) ({ if (false) {}; 0; }) -#endif -#if defined(DEBUG) && defined(HAVE_LIBGMP) #define pr_gmp_debug(fmt, arg...) gmp_printf(fmt, ##arg) -#else -#define pr_gmp_debug(fmt, arg...) ({ if (false) {}; 0; }) -#endif #define __fmtstring(x, y) __attribute__((format(printf, x, y))) #if 0 @@ -35,11 +27,7 @@ #define __must_check __attribute__((warn_unused_result)) #define __noreturn __attribute__((__noreturn__)) -#ifdef DEBUG #define BUG(fmt, arg...) ({ fprintf(stderr, "BUG: " fmt, ##arg); assert(0); }) -#else -#define BUG(fmt, arg...) assert(0) -#endif #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) #define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1) |